1.

Solve : Super Help!! Coding for a pure C++ OS - how to make a timer??

Answer»

I just landed in a excessive pile of C++.
All I've found is Windows and *nix ways of doing it.
I need a timer that works in a pure C++ OS!Should be able to use the ctime or ( time.h ) which allows you to access system time of PC etc. You then can request the time, save it into variable within a loop and when the time matches say time + 30 SECONDS it breaks out of the delay loop or triggers an event etc.

http://www.cplusplus.com/reference/ctime/

more here...

http://www.cplusplus.com/reference/ctime/time/

Curious as to what you mean by a timer that works in a pure C++ OS.... did you create your own OS?If the OP is using Microsoft libraries, he would need to look into the reference materiel.

C++ Language and Standard Libraries (Microsoft)


Or maybe the OP WANTS some actual code:
http://www.cplusplus.com/forum/beginner/102780/
The above has two short examples.


Quote from: Geek-9pm on June 18, 2014, 09:14:16 PM

If the OP is using Microsoft libraries, he would need to look into the reference materiel.
Well, given the FACT that they stated that they are wanting this for a "Pure C++ OS" this would kinda rule out the idea of there being Microsoft libraries! This is also backed up when they said "All I've found is Windows and *nix ways of doing it." which is what you have just given them again.That still raises the question of what a "Pure C++ OS" is, though. Particularly considering I find it doubtful they re-implemented the standard library for their system.Quote from: BC_Programmer on June 19, 2014, 09:23:39 AM
That still raises the question of what a "Pure C++ OS" is, though. Particularly considering I find it doubtful they re-implemented the standard library for their system.
That is what I thought too. The most widely used C++ libraries on a small computer are from Microsoft.Quote from: Geek-9pm on June 19, 2014, 10:06:12 AM
That is what I thought too. The most widely used C++ libraries on a small computer are from Microsoft.

I'd EXPECT glibc to have far more use. But neither is built to run on the OP's special OS, which is what makes me quizzical.


Discussion

No Comment Found