summaryrefslogtreecommitdiffstats
path: root/robotframework-onap/eteutils/UUID.py
blob: 1500076dc318e6b77e13c50aabe518cb85192415 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import uuid
import time
import datetime

class UUID:
    """UUID is a simple library that generates a uuid"""
    
    def generate_UUID(self):
        """generate a uuid"""
        return uuid.uuid4()
    
    def generate_MilliTimestamp_UUID(self):
        """generate a millisecond timestamp uuid"""
        then = datetime.datetime.now()
        return int(time.mktime(then.timetuple())*1e3 + then.microsecond/1e3)