Click here to Skip to main content
15,903,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: xmlhttp improper response Pin
Stuart Dootson3-Jul-09 3:34
professionalStuart Dootson3-Jul-09 3:34 
Questionthreads and their time slots. [modified] Pin
Souldrift2-Jul-09 23:45
Souldrift2-Jul-09 23:45 
AnswerRe: threads and their time slots. Pin
Stuart Dootson3-Jul-09 0:31
professionalStuart Dootson3-Jul-09 0:31 
GeneralRe: threads and their time slots. [modified] Pin
Souldrift3-Jul-09 1:17
Souldrift3-Jul-09 1:17 
GeneralRe: threads and their time slots. Pin
Stuart Dootson3-Jul-09 1:58
professionalStuart Dootson3-Jul-09 1:58 
GeneralRe: threads and their time slots. Pin
Souldrift3-Jul-09 2:43
Souldrift3-Jul-09 2:43 
GeneralRe: threads and their time slots. Pin
Stuart Dootson3-Jul-09 3:30
professionalStuart Dootson3-Jul-09 3:30 
GeneralRe: threads and their time slots. Pin
Souldrift3-Jul-09 5:44
Souldrift3-Jul-09 5:44 
Thanks for that. I highly appreciate you getting into this so much.
I all but copied your code and it works on my machine. But as soon as I put it on our server machine, the ol´ troublemakers show up again. I set a sleep time of appx. 10ms and usually the thing sleeps the day away ... well, 15 ms Smile | :) .

The output in my case is

RTPEngine: Next send time = 12891106961478.547000.
RTPEngine: Sending data package with size 480 (excluding header).
RTPEngine: Time now = 12891106961468.750000.
DoSendHere::Timer slept for 15.625000
RTPEngine: Packet sent at = 12891106961484.375000.
RTPEngine: Next send time = 12891106961494.172000.
RTPEngine: Sending data package with size 480 (excluding header).
RTPEngine: Time now = 12891106961484.375000.
DoSendHere::Timer slept for 0.000000
RTPEngine: Packet sent at = 12891106961484.375000.
RTPEngine: Next send time = 12891106961494.172000.
RTPEngine: Sending data package with size 480 (excluding header).
RTPEngine: Time now = 12891106961484.375000.
DoSendHere::Timer slept for 15.625000
RTPEngine: Packet sent at = 12891106961500.000000.
RTPEngine: Next send time = 12891106961509.797000.
JobManager: Job 0_0 processed packet with size 2048. Packets available: 67
RTPEngine: Preparing to send data bundle with size of 1520 bytes.
RTPEngine: Adding leftover (352 bytes).
RTPEngine: Sending data package with size 480 (excluding header).
RTPEngine: Time now = 12891106961500.000000.
DoSendHere::Timer slept for 15.625000
RTPEngine: Packet sent at = 12891106961515.625000.
RTPEngine: Next send time = 12891106961525.422000.
RTPEngine: Sending data package with size 480 (excluding header).
RTPEngine: Time now = 12891106961515.625000.
DoSendHere::Timer slept for 15.625000
RTPEngine: Packet sent at = 12891106961531.250000.


What bugs me even more than that (as seen in the output) is that the Timer sometimes sleeps for 0 ms even though it should wait.
Looking into it ... might be something with threads and time-slices, after all.

Souldrift
AnswerRe: threads and their time slots. Pin
Roger Stoltz3-Jul-09 2:09
Roger Stoltz3-Jul-09 2:09 
GeneralRe: threads and their time slots. Pin
Souldrift3-Jul-09 2:50
Souldrift3-Jul-09 2:50 
AnswerRe: threads and their time slots. Pin
Keith Worden3-Jul-09 5:29
Keith Worden3-Jul-09 5:29 
GeneralRe: threads and their time slots. Pin
Souldrift3-Jul-09 6:04
Souldrift3-Jul-09 6:04 
AnswerRe: threads and their time slots. Pin
Souldrift3-Jul-09 6:07
Souldrift3-Jul-09 6:07 
GeneralRe: threads and their time slots. Pin
Keith Worden3-Jul-09 6:18
Keith Worden3-Jul-09 6:18 
GeneralRe: threads and their time slots. Pin
Souldrift3-Jul-09 6:39
Souldrift3-Jul-09 6:39 
AnswerRe: threads and their time slots. Pin
Souldrift3-Jul-09 6:48
Souldrift3-Jul-09 6:48 
AnswerRe: threads and their time slots. Pin
Souldrift3-Jul-09 7:34
Souldrift3-Jul-09 7:34 
GeneralRe: threads and their time slots. Pin
Stuart Dootson3-Jul-09 8:33
professionalStuart Dootson3-Jul-09 8:33 
GeneralRe: threads and their time slots. Pin
Roger Stoltz3-Jul-09 8:41
Roger Stoltz3-Jul-09 8:41 
GeneralRe: threads and their time slots. Pin
Stuart Dootson3-Jul-09 8:50
professionalStuart Dootson3-Jul-09 8:50 
GeneralRe: threads and their time slots. Pin
Roger Stoltz3-Jul-09 8:55
Roger Stoltz3-Jul-09 8:55 
GeneralRe: threads and their time slots. Pin
Souldrift5-Jul-09 21:37
Souldrift5-Jul-09 21:37 
GeneralRe: threads and their time slots. Pin
Stuart Dootson5-Jul-09 21:43
professionalStuart Dootson5-Jul-09 21:43 
GeneralRe: threads and their time slots. [modified] Pin
Souldrift5-Jul-09 22:19
Souldrift5-Jul-09 22:19 
GeneralRe: threads and their time slots. Pin
Stuart Dootson5-Jul-09 23:30
professionalStuart Dootson5-Jul-09 23:30 

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.