Results 1 to 3 of 3

Thread: [RESOLVED] keep the previous time

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2007
    Posts
    694

    Resolved [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

  2. #2
    PowerPoster motil's Avatar
    Join Date
    Apr 2009
    Location
    Tel Aviv, Israel
    Posts
    2,143

    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

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2007
    Posts
    694

    Re: keep the previous time

    Solved. thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width