Mercurial > projects > dynamin
comparison dynamin/core/windows_environment.d @ 106:acdbb30fee7e
Port to D2.
Most of the effort was dealing with immutable and const.
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Mon, 17 Dec 2012 23:41:50 -0600 |
parents | 73060bc3f004 |
children |
comparison
equal
deleted
inserted
replaced
105:97997a544ac0 | 106:acdbb30fee7e |
---|---|
34 timeBeginPeriod(period); | 34 timeBeginPeriod(period); |
35 } | 35 } |
36 long backend_runningTime() { | 36 long backend_runningTime() { |
37 // NOTE: might be a faster way to do this...ProcessorTime is slow | 37 // NOTE: might be a faster way to do this...ProcessorTime is slow |
38 // Use ProcessorTime to fix when timeGetTime() rolls over | 38 // Use ProcessorTime to fix when timeGetTime() rolls over |
39 const strayMs = 18_000_000; // 5 hours | 39 enum strayMs = 18_000_000; // 5 hours |
40 long pNow = processorTime; | 40 long pNow = processorTime; |
41 long tNow = timeGetTime(); | 41 long tNow = timeGetTime(); |
42 // pNow-startDiff would equal tNow except that: | 42 // pNow-startDiff would equal tNow except that: |
43 // - tNow has possibly rolled over | 43 // - tNow has possibly rolled over |
44 // - pNow has strayed because it runs at a slightly different speed | 44 // - pNow has strayed because it runs at a slightly different speed |