|
-
Feb 7th, 2011, 04:36 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] keep the previous time
My service constantly receives several different messages...
I would like to place a logic which checks if a prticular message is received within (A particular time interval) say 30 seconds of the previous one.
What is the best way to start this? where should I keep the previously received messagetime so that I can compare it to the new received time?...
Thanks
-
Feb 7th, 2011, 05:30 AM
#2
Re: keep the previous time
the simplest way I can think of is to use private (static?) DateTime member which holds the previous last time stamp, if this application supports multithreading then you'll have to use the lock statement.
* Rate It  If you Like it
__________________________________________________________________________________________
" Programming is like sex: one mistake and you’re providing support for a lifetime."
Get last SQL insert ID 
-
Feb 7th, 2011, 05:50 AM
#3
Thread Starter
Fanatic Member
Re: keep the previous time
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|