summaryrefslogtreecommitdiffstats
path: root/fastos/src/vespa/fastos/time.cpp
blob: 1a824c7132fba0156fdf56302a564c1e2bf5f6ce (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include <vespa/fastos/time.h>

double
FastOS_TimeInterface::MicroSecsToNow(void) const
{
    FastOS_Time now;
    now.SetNow();
    return now.MicroSecs() - MicroSecs();
}

double
FastOS_TimeInterface::MilliSecsToNow(void) const
{
    FastOS_Time now;
    now.SetNow();
    return now.MilliSecs() - MilliSecs();
}