Click here to Skip to main content
12,751,832 members (30,010 online)
Rate this:
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 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 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 8-Feb-13 5:02am
Just use the value returned from the time() function. The documentation on MSDN shows how to do it.
ranjithkumar81 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170217.1 | Last Updated 7 Feb 2013
Copyright © CodeProject, 1999-2017
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