c# - timer on thread? -
can create timer clock on thread? i'm creating 1 doesn't seem work well. app multi-thread app has start timer on thread when ever event happens. timer placed in every client connection. clock doesn't work until close winform(i don't know why) . there in particular should know timers in threads ?
here timer code :
timer1.interval = 1000; timer1.tick += new eventhandler(timer_tick); timer1.enabled = true; timer1.start();
you might try use system.threading.timer
, timer that's in separate thread. might consider using waithandle
that's never fired , using waitone(1000, false)
wait second.
Comments
Post a Comment