How to add time to Clock.currTime
Brad Anderson
eco at gnuk.net
Fri Oct 4 14:50:30 PDT 2013
On Friday, 4 October 2013 at 21:46:43 UTC, JohnnyK wrote:
> Hi All,
> I did search but I cannot find it anywhere. All I want to do
> is add 300 seconds to the output of Clock.currTime. So
> basically if Clock.currTime equals 2013-Oct-04 17:19:31.3338333
> then I want to subtract 300 seconds from that to get the time
> that it was 300 seconds ago. In other languages I would
> convert the time value to seconds and subtract the 300 seconds
> then convert it back to what ever time value it was before. I
> don't know how to convert 300 seconds to hnsecs and I have
> never actually heard of hnsecs before. Anyway if someone could
> help I would appreciate it.
auto t = Clock.currTime;
t -= 300.seconds;
t += 300.seconds;
More information about the Digitalmars-d-learn
mailing list