revert to old behavior of getStartMilsecs; getStartMilsecs deprecated
This commit is contained in:
parent
cb21b0e7a7
commit
909f7dbf8c
2 changed files with 8 additions and 8 deletions
|
|
@ -139,7 +139,7 @@ proc `<=` * (a, b: TTime): bool =
|
||||||
## returns true iff ``a <= b``.
|
## returns true iff ``a <= b``.
|
||||||
result = a - b <= 0
|
result = a - b <= 0
|
||||||
|
|
||||||
proc getStartMilsecs*(): int
|
proc getStartMilsecs*(): int {.deprecated.}
|
||||||
## get the miliseconds from the start of the program
|
## get the miliseconds from the start of the program
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -212,15 +212,15 @@ when not defined(ECMAScript):
|
||||||
proc getStartMilsecs(): int =
|
proc getStartMilsecs(): int =
|
||||||
#echo "clocks per sec: ", clocksPerSec, "clock: ", int(clock())
|
#echo "clocks per sec: ", clocksPerSec, "clock: ", int(clock())
|
||||||
#return clock() div (clocksPerSec div 1000)
|
#return clock() div (clocksPerSec div 1000)
|
||||||
when defined(posix):
|
when defined(macosx):
|
||||||
var a: Ttimeval
|
result = toInt(toFloat(clock()) / (toFloat(clocksPerSec) / 1000.0))
|
||||||
posix_gettimeofday(a)
|
|
||||||
result = a.tv_sec * 1000 + a.tv_usec
|
|
||||||
else:
|
else:
|
||||||
result = int(clock()) div (clocksPerSec div 1000)
|
result = int(clock()) div (clocksPerSec div 1000)
|
||||||
when false:
|
when false:
|
||||||
when defined(macosx):
|
var a: Ttimeval
|
||||||
result = toInt(toFloat(clock()) / (toFloat(clocksPerSec) / 1000.0))
|
posix_gettimeofday(a)
|
||||||
|
result = a.tv_sec * 1000 + a.tv_usec
|
||||||
|
#echo "result: ", result
|
||||||
|
|
||||||
proc getTime(): TTime = return timec(nil)
|
proc getTime(): TTime = return timec(nil)
|
||||||
proc getLocalTime(t: TTime): TTimeInfo =
|
proc getLocalTime(t: TTime): TTimeInfo =
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ Bugfixes
|
||||||
- Bugfix: Passing a ``ref`` pointer to the untyped ``pointer`` type is invalid.
|
- Bugfix: Passing a ``ref`` pointer to the untyped ``pointer`` type is invalid.
|
||||||
- Bugfix: Updated ``keyval`` example.
|
- Bugfix: Updated ``keyval`` example.
|
||||||
- Bugfix: ``system.splitChunk`` still contained code for debug output.
|
- Bugfix: ``system.splitChunk`` still contained code for debug output.
|
||||||
- Bugfix: ``times.getStartMilsecs`` uses ``gettimeofday`` for Posix times. It
|
- Bugfix: ``times.getStartMilsecs`` uses ``gettimeofday`` for Posix. It
|
||||||
used to use ``clock`` which has the wrong semantics.
|
used to use ``clock`` which has the wrong semantics.
|
||||||
- Bugfix: ``dialogs.ChooseFileToSave`` uses ``STOCK_SAVE`` instead of
|
- Bugfix: ``dialogs.ChooseFileToSave`` uses ``STOCK_SAVE`` instead of
|
||||||
``STOCK_OPEN`` for the GTK backend.
|
``STOCK_OPEN`` for the GTK backend.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue