Hello,
I have a project for school and I need it finished a in a few days.
What the project does is reads data from a txt file. Each row of the txt file contains a timestamp hh:mm:ss,mmm (example: 00:05:33,141).
Whenever the system time is equal to one of the records, I need to send data to a tcp client.
What I did is created a thread with a while(true) in it and verified if a row contains the current time, than send the data.
That is not good because it's not efficient.
I would need something like a timestamp event (not using Timer).
Any suggestions/code samples? I would appreciate some help here a lot. Unfortunately I am not good with writing custom events :(
So for example I would need an event that will occur on a given time. Example:
event(double time,DoThis) . If time is equal to timestamp, than execute function DoThis.
Can someone help?
Thanks!