aboutsummaryrefslogtreecommitdiffstats
path: root/fastos
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2019-11-15 10:53:09 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2019-11-15 10:53:09 +0000
commit363603705abd5d0204531f1ac8e5eb84338c120f (patch)
tree46f2aafb36a81107ad6878a7e5661dac87b91eee /fastos
parent5b2071b9f54c54cbc79225b27faf8ac645158e72 (diff)
Use ClockSteady and return TimeStamp instead of untyped int64_t without unit.
Diffstat (limited to 'fastos')
-rw-r--r--fastos/src/vespa/fastos/timestamp.cpp4
-rw-r--r--fastos/src/vespa/fastos/timestamp.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/fastos/src/vespa/fastos/timestamp.cpp b/fastos/src/vespa/fastos/timestamp.cpp
index de234a988cd..e35f0c968de 100644
--- a/fastos/src/vespa/fastos/timestamp.cpp
+++ b/fastos/src/vespa/fastos/timestamp.cpp
@@ -50,14 +50,14 @@ time() {
namespace {
-int64_t
+TimeStamp
steady_now() {
return duration_cast<nanoseconds>(steady_clock::now().time_since_epoch()).count();
}
}
-int64_t
+TimeStamp
ClockSteady::now()
{
return steady_now();
diff --git a/fastos/src/vespa/fastos/timestamp.h b/fastos/src/vespa/fastos/timestamp.h
index 300875ed4b8..c418b3aac7d 100644
--- a/fastos/src/vespa/fastos/timestamp.h
+++ b/fastos/src/vespa/fastos/timestamp.h
@@ -64,7 +64,7 @@ public:
class ClockSteady
{
public:
- static int64_t now();
+ static TimeStamp now();
};
class StopWatch