CFanatic

Go Back   CFanatic > Programming > C# Programming

Join CFanatic Forum Now

Timers on many objects topic posted under C# Programming which is a part of Programming category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 09-10-2010, 12:01 PM
Junior Member
 
Join Date: Sep 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
markyoung1984 is on a distinguished road
| More
Timers on many objects

Hi I have about 2000 fairly simple objects stored in a hash table within memory.

Each object has a date and time it was last accessed and this is stored in a variable. I basically want to access each object every 24 hours. Each object was last accessed at different times of the day so timers will vary. When 24 hours has passed for a certain object I want to start a thread and pass that object (I already know how to do this) to it (ParametizedThreadStart).

I am really not sure of what I should implement. I know there are timer classes but I have no idea which I would implement or how.

The only method I can see at the moment for doing this is by creating a thread which constantly loops through the objects in my hash table, comparing the variable in each object that tells me the date/time it was last accessed with the current date/time and calcualting if 24 hours has passed.

Do you have any recommendations?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Types of Timers coderzone C# Programming 2 03-09-2011 09:44 AM
timers with pthread bsushma C Programming 0 09-03-2010 04:51 AM
C# objects AxeSlash C# Programming 0 08-28-2010 03:00 AM
Creating Objects inspiration C Programming 4 03-27-2010 09:23 PM
Why .NEt objects in Heap coderzone C# Programming 0 06-04-2007 11:23 AM

 

Advertisement

CFanatic Search
Custom Search

Advertisement

All times are GMT -5. The time now is 02:59 AM.



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Cfanatic.com is a premier member of the IDG TechNetwork. For advertising opportunities contact here
Get Paid for Working on Projects Matching Your Expertise at Go4Expert's Jobs Board