1/*
2 * Copyright (C) 2011 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16/**
17 ************************************************************************
18 * @file         M4OSA_Time.h
19 * @ingroup      OSAL
20 * @brief        Time macros
21 * @note         This file defines time type and associated macros which must
22 *               be used to manipulate time.
23 ************************************************************************
24*/
25
26/* $Id: M4OSA_Time.h,v 1.2 2007/01/05 13:12:22 thenault Exp $ */
27
28#ifndef M4OSA_TIME_H
29#define M4OSA_TIME_H
30
31
32#include "M4OSA_Types.h"
33
34
35typedef signed long long  M4OSA_Time;
36
37
38/** This macro sets the unknown time value */
39
40#define M4OSA_TIME_UNKNOWN 0x80000000
41
42/** This macro converts a time with a time scale to millisecond.
43    The result is a M4OSA_Double*/
44#define M4OSA_TIME_TO_MS(result, time, timescale)\
45      { result = (1000*(M4OSA_Double)time)/((M4OSA_Double)timescale); }
46
47#endif /*M4OSA_TIME_H*/
48
49