in reply to How to add timer
Before going further, I would suggest that whatever the implementation, that you have an easier to use format for the log entries. "pdt1 2009/08/30 16:07:55", YYYY/MM/DD and use leading zero's. The reason for this order is so that a simple default sort on date/time will produce the right order without heroics. Since you are designing the log file output format, make it easy for you to deal with!
Past that, it appears that you have 3 states that are potentially relevant: I just started, I am still running now, I just stopped. While I am on this subject, it could be that you want the PID of each pdt1 process?
What would "some instance of my program was alive at this particular time which is 12 minutes past the hour, each hour" tell you? Usually not much.
Anyway, before going further into implementation, I would like to hear more about what kind of "end product" you intend to produce (presumably a report). What is going to be in that report?
|
|---|