@@ -72,9 +72,26 @@ def hms_from_startfile(self, dtstart):
7272 """Get the elapsed time starting from time in a starttime file"""
7373 return datetime .datetime .now () - dtstart if dtstart is not None else None
7474
75- def str_elapsed_hms (self , hms , msg ):
76- """Get a string describing the elapsed time"""
77- return f"{ msg } H:M:S { hms } for '{ self .project } ' ID={ self .name } "
75+ def str_elapsed_ymdhms (self , hms , msg ):
76+ """Get a string describing the elapsed time: YYYY-MM-DD HH:MM:SS"""
77+ ##return f"{msg} H:M:S {hms} for '{self.project}' ID={self.name}"
78+ return f"{ msg } H:M:S { hms } "
79+
80+ def str_started (self , dta ):
81+ """Get a string describing the elapsed time: HH:MM:SS"""
82+ ##return f"{msg} H:M:S {hms} for '{self.project}' ID={self.name}"
83+ return dta .strftime (consts .FMTDT_H )
84+
85+ def str_running (self , hms , rm_useconds = True ):
86+ """Get a string describing the elapsed time: HH:MM:SS"""
87+ ##return f"{msg} H:M:S {hms} for '{self.project}' ID={self.name}"
88+ if rm_useconds :
89+ hms = hms - datetime .timedelta (microseconds = hms .microseconds )
90+ return f"H:M:S { hms } by { self .name } for { self .project } "
91+
92+ def str_info (self ):
93+ """Get a string with the project, username, and csv filename"""
94+ return f'on `{ self .project } ` by `{ self .name } `'
7895
7996
8097# Copyright (C) 2025-present, DV Klopfenstein, PhD. All rights reserved.
0 commit comments