diff --git a/boswatch.py b/boswatch.py index 03ce8da..b0b423a 100755 --- a/boswatch.py +++ b/boswatch.py @@ -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 diff --git a/includes/helper/timeHandler.py b/includes/helper/timeHandler.py index 7c45fb4..d6b2ad9 100644 --- a/includes/helper/timeHandler.py +++ b/includes/helper/timeHandler.py @@ -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() diff --git a/plugins/interface.txt b/plugins/interface.txt index ee2860b..73ecbec 100644 --- a/plugins/interface.txt +++ b/plugins/interface.txt @@ -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