nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: prepare for new constructors
[nit.git]
/
lib
/
realtime.nit
diff --git
a/lib/realtime.nit
b/lib/realtime.nit
index
38a601c
..
68b7834
100644
(file)
--- a/
lib/realtime.nit
+++ b/
lib/realtime.nit
@@
-71,16
+71,10
@@
end
# Keeps track of real time
class Clock
# Time at instanciation
# Keeps track of real time
class Clock
# Time at instanciation
- protected var time_at_beginning : Timespec
+ protected var time_at_beginning = new Timespec.monotonic_now
# Time at last time a lapse method was called
# Time at last time a lapse method was called
- protected var time_at_last_lapse : Timespec
-
- init
- do
- time_at_beginning = new Timespec.monotonic_now
- time_at_last_lapse = new Timespec.monotonic_now
- end
+ protected var time_at_last_lapse = new Timespec.monotonic_now
# Smallest time frame reported by clock
fun resolution : Timespec `{
# Smallest time frame reported by clock
fun resolution : Timespec `{