~ubuntu-branches/ubuntu/karmic/e-uae/karmic

« back to all changes in this revision

Viewing changes to src/include/hrtimer.h

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Suerken
  • Date: 2008-07-05 14:02:02 UTC
  • Revision ID: james.westby@ubuntu.com-20080705140202-u5aagnhtg31pmjc3
Tags: upstream-0.8.29-WIP4
ImportĀ upstreamĀ versionĀ 0.8.29-WIP4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * E-UAE - The portable Amiga Emulator
 
3
 *
 
4
 * High-resolution timer support.
 
5
 *
 
6
 * (c) 2005 Richard Drummond
 
7
 */
 
8
 
 
9
#ifndef EUAE_HRTIMER_H
 
10
#define EUAE_HRTIMER_H
 
11
 
 
12
#include "machdep/rpt.h"
 
13
#include "osdep/hrtimer.h"
 
14
 
 
15
STATIC_INLINE frame_time_t uae_gethrtime (void)
 
16
{
 
17
#ifdef HAVE_MACHDEP_TIMER
 
18
    if (currprefs.use_processor_clock)
 
19
        return machdep_gethrtime ();
 
20
    else
 
21
#endif
 
22
        return osdep_gethrtime ();
 
23
}
 
24
 
 
25
STATIC_INLINE frame_time_t uae_gethrtimebase (void)
 
26
{
 
27
#ifdef HAVE_MACHDEP_TIMER
 
28
   if (currprefs.use_processor_clock)
 
29
       return machdep_gethrtimebase ();
 
30
   else
 
31
#endif
 
32
       return osdep_gethrtimebase ();
 
33
}
 
34
 
 
35
STATIC_INLINE void uae_inithrtimer (void)
 
36
{
 
37
#ifdef HAVE_MACHDEP_TIMER
 
38
   if (currprefs.use_processor_clock && machdep_inithrtimer ())
 
39
       return;
 
40
   else
 
41
#endif
 
42
       osdep_inithrtimer ();
 
43
}
 
44
 
 
45
#endif