blob: 0acd39e6fd8906e8036229c0d8aac20c116bed9b [file] [log] [blame]
[email protected]662500242011-07-08 16:35:381// Copyright (c) 2011 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]0141ba3c2011-07-12 20:58:585#ifndef PPAPI_SHARED_IMPL_TIME_CONVERSION_H_
6#define PPAPI_SHARED_IMPL_TIME_CONVERSION_H_
[email protected]662500242011-07-08 16:35:387
8#include "base/time.h"
9#include "ppapi/c/pp_time.h"
[email protected]f0a04c42011-08-26 22:43:2010#include "ppapi/shared_impl/ppapi_shared_export.h"
[email protected]662500242011-07-08 16:35:3811
[email protected]662500242011-07-08 16:35:3812namespace ppapi {
13
[email protected]f0a04c42011-08-26 22:43:2014PPAPI_SHARED_EXPORT PP_Time TimeToPPTime(base::Time t);
15PPAPI_SHARED_EXPORT base::Time PPTimeToTime(PP_Time t);
[email protected]662500242011-07-08 16:35:3816
[email protected]f0a04c42011-08-26 22:43:2017PPAPI_SHARED_EXPORT PP_TimeTicks TimeTicksToPPTimeTicks(base::TimeTicks t);
[email protected]662500242011-07-08 16:35:3818
19// Converts between WebKit event times and time ticks. WebKit event times are
20// currently expressed in terms of wall clock time. This function does the
21// proper mapping to time ticks, assuming the wall clock time doesn't change
22// (which isn't necessarily the case).
[email protected]f0a04c42011-08-26 22:43:2023PPAPI_SHARED_EXPORT PP_TimeTicks EventTimeToPPTimeTicks(double event_time);
24PPAPI_SHARED_EXPORT double PPTimeTicksToEventTime(PP_TimeTicks t);
[email protected]662500242011-07-08 16:35:3825
26} // namespace ppapi
[email protected]662500242011-07-08 16:35:3827
[email protected]0141ba3c2011-07-12 20:58:5828#endif // PPAPI_SHARED_IMPL_TIME_CONVERSION_H_