summaryrefslogtreecommitdiffstats
path: root/xbmc/platform/linux/TimeUtils.cpp
blob: 55cce92ddc80035f6e71a789c77cb5c6302f3bd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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);
}