Mercurial Hosting > traffic-intelligence
diff python/utils.py @ 381:387cc0142211
script to replay event annotations
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Fri, 19 Jul 2013 11:58:35 -0400 |
parents | 2e6b8610bcaa |
children | 6d26dcc7bba0 |
line wrap: on
line diff
--- a/python/utils.py Fri Jul 19 09:11:57 2013 -0400 +++ b/python/utils.py Fri Jul 19 11:58:35 2013 -0400 @@ -155,6 +155,9 @@ seconds = seconds - m*60 return time(h, m, seconds) +def timeToFrames(t, frameRate): + return frameRate*(t.hour*3600+t.minute*60+t.second) + def sortXY(X,Y): 'returns the sorted (x, Y(x)) sorted on X' D = {}