diff options
Diffstat (limited to 'xbmc/platform/linux/TimeUtils.cpp')
-rw-r--r-- | xbmc/platform/linux/TimeUtils.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/xbmc/platform/linux/TimeUtils.cpp b/xbmc/platform/linux/TimeUtils.cpp new file mode 100644 index 0000000..55cce92 --- /dev/null +++ b/xbmc/platform/linux/TimeUtils.cpp @@ -0,0 +1,14 @@ +/* + * Copyright (C) 2017-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#include "TimeUtils.h" + +std::int64_t KODI::LINUX::TimespecDifference(timespec const& start, timespec const& end) +{ + return (end.tv_sec - start.tv_sec) * UINT64_C(1000000000) + (end.tv_nsec - start.tv_nsec); +}
\ No newline at end of file |