Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C++ Linux
Dear All,
I have to make one application, the application measure timestamp in minutes.
In every minutes , how many messages received from the server.
Could any can help me to implement in this.
Posted 7-Feb-13 0:05am
nv3 at 7-Feb-13 5:09am
What has your question to do with "local time calculation"? And what are you having difficulties with? Please note that this is not a software ordering service, but a quick-answer section.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Capture the current time using time() or similar, and zeroise the counter. Every time a message arrives add 1 to the counter. Check the time, and when 60 seconds have elapsed display the counter.
ranjithkumar81 at 8-Feb-13 0:47am
Do we have any predefined API , which can add currentTime + seconds.
Example: Currnet Time : 10:23:45
here i am adding 60 seconds = 10:24:45
Richard MacCutchan at 8-Feb-13 5:02am
Just use the value returned from the time() function. The documentation on MSDN shows how to do it.
ranjithkumar81 at 18-Feb-13 6:15am
thanks man

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 575
1 Kornfeld Eliyahu Peter 409
2 Maciej Los 369
3 DamithSL 196
4 OriginalGriff 188
0 OriginalGriff 6,353
1 DamithSL 4,854
2 Maciej Los 4,476
3 Kornfeld Eliyahu Peter 4,058
4 Sergey Alexandrovich Kryukov 3,917

Advertise | Privacy | Mobile
Web01 | 2.8.141223.1 | Last Updated 7 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100