TheSecOrg
0
Junior Poster
Recommended Answers
Jump to PostHow good of a timer are you trying to write? If it's a boo-boo practice exercise or you don't need sub-second granularity, the standard <ctime> library is more than sufficient. Just wrap a few function calls in a class and call it good.
Jump to Post>I don't know what functions it has though.
Hmm, that sounds like a job for a reference. :icon_rolleyes:Here's a quickie example to get you started:
#include <ctime> #include <iostream> namespace jsw { class timer { bool _running; time_t _start; time_t _stop; double …
All 6 Replies
Narue
5,707
Bad Cop
Team Colleague
TheSecOrg
0
Junior Poster
Narue
5,707
Bad Cop
Team Colleague
TheSecOrg
0
Junior Poster
Narue
5,707
Bad Cop
Team Colleague
TheSecOrg
0
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.