live-log examples questions #2127
-
I try to change timer period from 1000 to 5 ,per second message count is 20 times,not 200 times ,why? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Because, as depicted in the tutorials and documentation, this is a single-threaded event-driven system. The timers run when the event manager runs, and if your event manager sleeps for 50ms, the smallest timer lapse you may have is 50ms, and 1/0.05 = 20
|
Beta Was this translation helpful? Give feedback.
Because, as depicted in the tutorials and documentation, this is a single-threaded event-driven system. The timers run when the event manager runs, and if your event manager sleeps for 50ms, the smallest timer lapse you may have is 50ms, and 1/0.05 = 20
https://mongoose.ws/documentation/tutorials/webui-push/#backend-implementation-2 links to
http://mongoose.ws/documentation/tutorials/timers/#minimal-example , which states