Created
May 9, 2015 15:53
-
-
Save Yepoleb/9452c236187dc4a99930 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Clock | |
{ | |
public: | |
Clock(); | |
long reset(); | |
private: | |
long lasttime; | |
} | |
Clock::Clock() | |
{ | |
lasttime = 0; | |
} | |
long Clock::reset() | |
{ | |
long newtime = getTimehnsec(); | |
long duration = newtime - lasttime; | |
lasttime = newtime; | |
return duration; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment