Daniel Sheppard
2/7/2007 3:34:00 AM
> I 'm doing a deamon that call a method every hour. Is there
> any class in
> the standard library that I can use for counting the time?
If it's only going to do something every hour, are you sure you want a
daemon? Why not just have it run in a cron job (or scheduled task on
windows). If it's a daemon, it's going to sit there and consume memory
when it's not doing anything.
If you really want your process to sit around, either use sleep(60*60)
or if you need more accuracy than that, do some calculations with
DateTime to figure out how long it will be till the next hour mark.