Mercurial > templog
comparison py/utils.py @ 144:482d7852b511
a bit more, and some tests
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 26 Nov 2012 23:21:03 +0800 |
parents | 4755e6f9a5b8 |
children | 6517ddee3187 |
comparison
equal
deleted
inserted
replaced
143:0895f5ad7731 | 144:482d7852b511 |
---|---|
9 W = logging.warning | 9 W = logging.warning |
10 E = logging.error | 10 E = logging.error |
11 | 11 |
12 DEFAULT_TRIES = 3 | 12 DEFAULT_TRIES = 3 |
13 READLINE_SELECT_TIMEOUT = 1 | 13 READLINE_SELECT_TIMEOUT = 1 |
14 | |
15 def EX(msg, *args, **kwargs): | |
16 kwargs['exc_info'] = True | |
17 logging.error(msg, *args, **kwargs) | |
14 | 18 |
15 clock_gettime = None | 19 clock_gettime = None |
16 no_clock_gettime = True | 20 no_clock_gettime = True |
17 def monotonic_time(): | 21 def monotonic_time(): |
18 global clock_gettime | 22 global clock_gettime |