Timer

simendsjo simendsjo at gmail.com
Mon Feb 17 03:11:05 PST 2014


On Monday, 17 February 2014 at 11:08:16 UTC, Chris wrote:
> The D way of implementing a timer? I need to (automatically) 
> execute a function that performs a clean up, say every hour.
>
> if (file.older than 1 hour) {
>     remove;
> }

Vibe.d can be used for this to get an OS agnostic solution.
Haven't used it myself, but this function seems to be what you 
are looking for: 
https://github.com/rejectedsoftware/vibe.d/blob/master/source/vibe/core/core.d#L342


More information about the Digitalmars-d-learn mailing list