Thank you rcgldr. I will give that a try. Now that I am no longer using Beep() I no longer have the delay/s in the sound. I don't believe the context switch to my task was really an issue as the...
Type: Posts; User: Fat Agnus
Thank you rcgldr. I will give that a try. Now that I am no longer using Beep() I no longer have the delay/s in the sound. I don't believe the context switch to my task was really an issue as the...
Than you rcgld, I will try that and see if it evens out any (now) small timing variations.
At the moment the program opens a console window. I'm using the MinGW complier in the codeblocks IDE. ...
Than you rcgldr. The delay seems to be the time to make the actual Beep() from making a call to the function. There is not always a noticeable delay but there is often on the first Beep(). I have...
My test/s seem to indicate that it is the Beep() function itself causing the delay. Can you think of any way around this using Windows 10. I have looked at making a call to the BIOS but it doesn't...
I believe it's the long sleep causing an issue with processor time allocation.
Thank you. I think it worked ok for me Beeping every minute. Can you try hourly and see if it still works ok?
Thank you rcgldr. I'm currently using Windows 10. My old laptop has a little internal speaker which is where the beep sound emanates from.
I can't get that code to compile as is, the compiler doesn't like timeGetDevCaps. I can look at this in the evening.
alogorism I have run your code but still have the same inherent problem. I can change the task priority to real time using Task Manager but that does not seem to make any difference. I assume you...
Thank you algorism. I will compile and report back.
Thank you for the tips Salem. I was thinking of changing the priority of the program. As it's sleeping for the majority of the time it should have little impact on system performance.
Thanks Salem. The program wakes from sleep in time as witnessed by my
printf("Sleep finished\n"); . The 5050 figure has been larger in the past like 6000 but I still have the same problem. I...
The complete code is:
/* Programme to mimic Grenwich time signal (BBC pips) © Fat Agnus, all rights reserved */
#include <Windows.h>
#include <stdio.h>
millisecondsuntiltoh is the number of milliseconds until the top of the hour 0min, 0 seconds of the hour. I am not assuming things happen in zero time and have taken account of this.
Hi,
I have written some code that mimics the Grenwich time signal beeps. The programme spends most of the time sleeping. The programme exits sleep just before 5 seconds to the hour, waits for 55...