Statistics
| Branch: | Tag: | Revision:

root / commissioning / utils / newname.py @ eec92c03

History | View | Annotate | Download (211 Bytes)

1

    
2
from time import time
3

    
4
_counter = 0
5

    
6
def newname(prefix):
7
    global _counter;
8
    _counter += 1
9
    ident = id(locals())
10
    nonce = int(time() * 1000) + _counter
11
    return "%s%x%x" % (prefix, ident, nonce)
12