Resolution of core.time.Duration...

Daniel Gibson metalcaedes at gmail.com
Tue May 17 06:42:27 PDT 2011


Am 17.05.2011 15:25, schrieb Steven Schveighoffer:
> 
> I agree that accepting a long as an alternative to Duration, it makes
> sense to use a more normal tick resolution.  The chances of someone
> wanting to have their process sleep for more than 300 years (e.g. for
> nanosecond resolution) is pretty small.  This might be a worthwhile change.
> 
> I'm not sure how much code this might affect, though.  It would be
> plenty disturbing if your code started sleeping for 100ms instead of the
> 10s you thought you requested.  What might be a good path is to disable
> those functions that accept a long for a few releases, then re-instate
> them with a new meaning.
> 

Or just add nanoSleep() or something like that.

Cheers,
- Daniel


More information about the Digitalmars-d mailing list