diff --git a/doomsday/libdeng2/include/de/data/time.h b/doomsday/libdeng2/include/de/data/time.h index 4e4589eaa1..154e1d5746 100644 --- a/doomsday/libdeng2/include/de/data/time.h +++ b/doomsday/libdeng2/include/de/data/time.h @@ -109,6 +109,12 @@ class DENG2_PUBLIC Time : public ISerializable return Delta(milliseconds/1000.0); } + /** + * Determines the amount of time passed since the beginning of the native + * process (i.e., since creation of the high performance timer). + */ + static Delta sinceStartOfProcess(); + /** * Blocks the thread. */ diff --git a/doomsday/libdeng2/src/data/time.cpp b/doomsday/libdeng2/src/data/time.cpp index a899d7765b..35668dfdce 100644 --- a/doomsday/libdeng2/src/data/time.cpp +++ b/doomsday/libdeng2/src/data/time.cpp @@ -71,6 +71,11 @@ ddouble TimeDelta::asDays() const return asHours() / 24; } +Time::Delta Time::Delta::sinceStartOfProcess() +{ + return highPerfTimer.elapsed(); +} + void TimeDelta::sleep() const { if(_seconds < 60)