mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
+ minor issues
This commit is contained in:
parent
7730415547
commit
680ccbc1cc
@ -1,4 +1,4 @@
|
||||
//
|
||||
//
|
||||
// FILE: StopWatch.cpp
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.1.03
|
||||
@ -7,13 +7,13 @@
|
||||
// The library is based upon millis() and therefore
|
||||
// has the same restrictions as millis() has wrt overflow.
|
||||
//
|
||||
// HISTORY:
|
||||
// HISTORY:
|
||||
// 0.1.00 - 2011-01-04 initial version
|
||||
// 0.1.01 - 2011-01-04 Added better state
|
||||
// 0.1.02 - 2011-06-15 Added state() + #defines + lib version
|
||||
// 0.1.03 - 2012-01-22 Added several improvements
|
||||
// By mromani & Rob Tillaart
|
||||
//
|
||||
//
|
||||
// Released to the public domain
|
||||
//
|
||||
|
||||
@ -32,7 +32,7 @@ StopWatch::StopWatch(enum Resolution res)
|
||||
case SECONDS:
|
||||
_gettime = seconds;
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
_gettime = millis;
|
||||
break;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
#ifndef StopWatch_h
|
||||
#define StopWatch_h
|
||||
//
|
||||
//
|
||||
// FILE: StopWatch.h
|
||||
// AUTHOR: Rob Tillaart
|
||||
// PURPOSE: Simple StopWatch library for Arduino
|
||||
@ -18,14 +18,14 @@
|
||||
#include "WProgram.h"
|
||||
#endif
|
||||
|
||||
class StopWatch
|
||||
class StopWatch
|
||||
{
|
||||
public:
|
||||
enum State { RESET, RUNNING, STOPPED };
|
||||
enum Resolution { MILLIS, MICROS, SECONDS };
|
||||
StopWatch(enum Resolution res = MILLIS);
|
||||
void start();
|
||||
void stop();
|
||||
void stop();
|
||||
void reset();
|
||||
unsigned long value();
|
||||
unsigned long elapsed() { return value(); };
|
||||
|
Loading…
Reference in New Issue
Block a user