/src/mozilla-central/dom/media/doctor/DDTimeStamp.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* vim:set ts=2 sw=2 sts=2 et cindent: */ |
3 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
4 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
5 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | #include "DDTimeStamp.h" |
8 | | |
9 | | namespace mozilla { |
10 | | |
11 | | double |
12 | | ToSeconds(const DDTimeStamp& aTimeStamp) |
13 | 0 | { |
14 | 0 | // Timestamp at first call, used internally to convert log timestamps |
15 | 0 | // to a duration from this timestamp. |
16 | 0 | // What's important is the relative time between log messages. |
17 | 0 | static const DDTimeStamp sInitialTimeStamp = TimeStamp::Now(); |
18 | 0 |
|
19 | 0 | return (aTimeStamp - sInitialTimeStamp).ToSeconds(); |
20 | 0 | } |
21 | | |
22 | | } // namespace mozilla |