Click here to Skip to main content
12,246,754 members (58,901 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.

Regards,
Ranjith
Posted 7-Feb-13 0:05am
Comments
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
 
good
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.
  Permalink  
Comments
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
Web02 | 2.8.160426.1 | Last Updated 7 Feb 2013
Copyright © CodeProject, 1999-2016
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