mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-01-22 08:10:24 +01:00
insert helper function timeHandler.getTimestamp()
This commit is contained in:
parent
4a995683c0
commit
ac8a02e3ca
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue