Ignore:
Timestamp:
04/21/12 14:49:45 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Message:

The PIREP can be created and sent.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/util.py

    r89 r97  
    22
    33import math
     4import time
    45
    56#------------------------------------------------------------------------------
     
    7576#------------------------------------------------------------------------------
    7677
     78def getTimestampString(timestamp):
     79    """Get the string representation of the given timestamp."""
     80    return time.strftime("%H:%M:%S", time.gmtime(timestamp))
     81
     82#------------------------------------------------------------------------------
     83
    7784def getTimeIntervalString(seconds):
    7885    """Get a more human-friendly representation of the given time interval
     
    8188    minutes = int((seconds / 60) % 60)
    8289    seconds = int(seconds % 60)
    83     return "%d:%02d:%02d" % (hours, minutes, seconds)
     90    return "%02d:%02d:%02d" % (hours, minutes, seconds)
    8491
    8592#------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.