[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[minion-cvs] Remove redundant makegmtime function; call overhead act...
Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv3339/lib/mixminion
Modified Files:
Common.py
Log Message:
Remove redundant makegmtime function; call overhead actually matters (was 3% of parsing ServerInfo).
Index: Common.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/Common.py,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- Common.py 16 Dec 2002 02:40:11 -0000 1.36
+++ Common.py 29 Dec 2002 20:25:32 -0000 1.37
@@ -8,7 +8,7 @@
__all__ = [ 'LOG', 'LogStream', 'MixError', 'MixFatalError',
'MixProtocolError', 'ceilDiv', 'checkPrivateDir',
'createPrivateDir', 'floorDiv', 'formatBase64', 'formatDate',
- 'formatTime', 'installSignalHandlers', 'isSMTPMailbox', 'mkgmtime',
+ 'formatTime', 'installSignalHandlers', 'isSMTPMailbox',
'onReset', 'onTerminate', 'previousMidnight', 'secureDelete',
'stringContains', 'waitForChildren' ]
@@ -513,14 +513,6 @@
#----------------------------------------------------------------------
# Time processing
-
-def mkgmtime(yyyy,MM,dd,hh,mm,ss):
- """Analogously to time.mktime, return a number of seconds since the
- epoch when GMT is yyyy/MM/dd hh:mm:ss"""
-
- # we set the DST flag to zero so that subtracting time.timezone always
- # gives us gmt.
- return calendar.timegm((yyyy,MM,dd,hh,mm,ss,0,0,0))
def previousMidnight(when):
"""Given a time_t 'when', return the greatest time_t <= when that falls