Click here to Skip to main content
15,896,727 members
Home / Discussions / C#
   

C#

 
GeneralRe: how about erasing trace of Rectangle? Pin
Pete O'Hanlon1-Jun-10 2:37
mvePete O'Hanlon1-Jun-10 2:37 
QuestionUnhandled exception in the designer (OnPaint) Pin
AussieLew31-May-10 13:18
AussieLew31-May-10 13:18 
AnswerRe: Unhandled exception in the designer (OnPaint) Pin
Luc Pattyn31-May-10 13:30
sitebuilderLuc Pattyn31-May-10 13:30 
AnswerRe: Unhandled exception in the designer (OnPaint) Pin
Stanciu Vlad31-May-10 21:57
Stanciu Vlad31-May-10 21:57 
QuestionSerial interface RS-232 C# app data recive issue Pin
sebogawa31-May-10 9:32
sebogawa31-May-10 9:32 
AnswerRe: Serial interface RS-232 C# app data recive issue Pin
Luc Pattyn31-May-10 9:53
sitebuilderLuc Pattyn31-May-10 9:53 
AnswerRe: Serial interface RS-232 C# app data recive issue Pin
Richard Andrew x6431-May-10 11:14
professionalRichard Andrew x6431-May-10 11:14 
QuestionTime event? Real time data send Pin
sodevrom31-May-10 6:46
sodevrom31-May-10 6:46 
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 Frown | :(

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.

In this way I would avoid a while(true) that will eat all processor.
Also, System.Threading.Seep is not an alternative because I need this to be precise.

Can someone help?

Thanks!
AnswerRe: Time event? Real time data send Pin
Luc Pattyn31-May-10 7:03
sitebuilderLuc Pattyn31-May-10 7:03 
GeneralRe: Time event? Real time data send Pin
sodevrom31-May-10 7:12
sodevrom31-May-10 7:12 
GeneralRe: Time event? Real time data send Pin
Luc Pattyn31-May-10 7:14
sitebuilderLuc Pattyn31-May-10 7:14 
GeneralRe: Time event? Real time data send Pin
sodevrom31-May-10 7:18
sodevrom31-May-10 7:18 
AnswerRe: Time event? Real time data send Pin
OriginalGriff31-May-10 9:59
mveOriginalGriff31-May-10 9:59 
AnswerRe: Time event? Real time data send Pin
Anthony Mushrow31-May-10 14:47
professionalAnthony Mushrow31-May-10 14:47 
AnswerRe: Time event? Real time data send Pin
Anthony Mushrow1-Jun-10 4:49
professionalAnthony Mushrow1-Jun-10 4:49 
Questionstyle button Pin
toba tavasoli31-May-10 5:09
toba tavasoli31-May-10 5:09 
AnswerRe: style button Pin
OriginalGriff31-May-10 5:12
mveOriginalGriff31-May-10 5:12 
AnswerRe: style button Pin
Abhinav S31-May-10 6:00
Abhinav S31-May-10 6:00 
AnswerRe: style button Pin
Smithers-Jones31-May-10 8:07
Smithers-Jones31-May-10 8:07 
QuestionSpeed Issue in POS Customer Display Pin
NetMan201231-May-10 4:34
NetMan201231-May-10 4:34 
AnswerRe: Speed Issue in POS Customer Display Pin
Luc Pattyn31-May-10 4:51
sitebuilderLuc Pattyn31-May-10 4:51 
AnswerRe: Speed Issue in POS Customer Display Pin
Alan Balkany1-Jun-10 3:50
Alan Balkany1-Jun-10 3:50 
Questionstringbuilder to string Pin
michaelgr131-May-10 1:22
michaelgr131-May-10 1:22 
AnswerRe: stringbuilder to string Pin
Rajeshwar Code- Developer31-May-10 1:31
Rajeshwar Code- Developer31-May-10 1:31 
GeneralRe: stringbuilder to string Pin
michaelgr131-May-10 1:32
michaelgr131-May-10 1:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.