WPILibC++
trunk
Main Page
Related Pages
Classes
Files
File List
Timer.h
1
/*----------------------------------------------------------------------------*/
2
/* Copyright (c) FIRST 2008. All Rights Reserved. */
3
/* Open Source Software - may be modified and shared by FRC teams. The code */
4
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
5
/*----------------------------------------------------------------------------*/
6
7
#ifndef TIMER_H_
8
#define TIMER_H_
9
10
#include "semLib.h"
11
#include "Base.h"
12
13
typedef
void (*TimerInterruptHandler)(
void
*param);
14
15
void
Wait(
double
seconds);
16
double
GetClock();
17
double
GetTime();
18
19
27
class
Timer
28
{
29
public
:
30
Timer
();
31
virtual
~
Timer
();
32
double
Get
();
33
void
Reset
();
34
void
Start
();
35
void
Stop
();
36
bool
HasPeriodPassed
(
double
period);
37
38
static
double
GetFPGATimestamp();
39
static
double
GetPPCTimestamp();
40
41
private
:
42
double
m_startTime;
43
double
m_accumulatedTime;
44
bool
m_running;
45
SEM_ID m_semaphore;
46
DISALLOW_COPY_AND_ASSIGN(
Timer
);
47
};
48
49
#endif
Timer::Timer
Timer()
Definition:
Timer.cpp:61
Timer
Definition:
Timer.h:27
Timer::HasPeriodPassed
bool HasPeriodPassed(double period)
Definition:
Timer.cpp:158
Timer::Reset
void Reset()
Definition:
Timer.cpp:110
Timer::Stop
void Stop()
Definition:
Timer.cpp:138
Timer::Get
double Get()
Definition:
Timer.cpp:85
Timer::Start
void Start()
Definition:
Timer.cpp:122
Generated on Sat Apr 26 2014 12:26:59 for WPILibC++ by
1.8.6