insert helper function timeHandler.getTimestamp()

This commit is contained in:
Bastian Schroll 2015-07-02 21:39:43 +02:00
parent 4a995683c0
commit ac8a02e3ca
3 changed files with 10 additions and 1 deletions

View file

@ -21,7 +21,7 @@ import logging.handlers
import argparse # for parse the args
import ConfigParser # for parse the config file
import os # for log mkdir
import time # for timestamp
import time # for time.sleep()
import subprocess # for starting rtl_fm and multimon-ng
from includes import globals # Global variables

View file

@ -47,3 +47,11 @@ def getTime():
@return: Formated time
"""
return curtime("%H:%M:%S")
def getTimestamp():
"""
Returns a integer timestamp
@return: integer timestamp
"""
return int(time.time()

View file

@ -87,6 +87,7 @@ from includes.helper import timeHandler
timeHandler.curtime("FORMAT") # without format string the function returns with "%d.%m.%Y %H:%M:%S"
timeHandler.getDate() # Gets the date in "%d.%m.%Y"
timeHandler.getTime() # Gets the time in %H:%M:%S
timeHandler.getTimestamp() # Gets a integer timestamp
# replace all the standard wildcards in the given text