Can anyone kindly advise me if I've done something wrong in my program as shown below. A time delay (I used "usleep" here) is necessary to cycle through the different channels of the ADC (device to...
Type: Posts; User: kenkoh
Can anyone kindly advise me if I've done something wrong in my program as shown below. A time delay (I used "usleep" here) is necessary to cycle through the different channels of the ADC (device to...
Thanks for the suggestion. However, I'm not using the time delay to synchronise between the two threads. In fact, I've used the pthread_cond_wait() and pthread_cond_signal() for that purpose.
The...
Thanks for the response. In fact I do not need the precise timing on the delay. I just need a simple "sleep" delay which does not take up much of the processor.
I'm using it for my multithreading...
Can I ask if anyone can advise me on the command to provide accurate timing delay in C which which I can use for my multithreading application using pthread?
I've tried generating a "for" loop...
Hi Salem,
Thanks for your comments.
Yes, there seems to have a time delay between the time when the data was in the buffer and when the data is actually written in the file. I've actually...
I have been trying to learn POSIX threads programming for my application - to receive data from an external device and store the data to a log file, with both processes running in parallel.
I've...
Hi there,
I’m trying out on a simple example to read and write values at the same time using the mutex and condition (so that the write process will only execute after specific number of samples)....
Can I ask if anyone tried using the command "ftime"? I've tried to incorporate that in my program and it seems like the command could not be recognised.
#include <sys/timeb.h>
struct...
High performance timers? Anything for Linux please!
I've looked at some of the examples running "for" loops for specific number of times and then calculate the delay. However, this may not be...
Hi there,
Can I ask what is the simplest method to determine the time it takes to execute specific process (within a program) with microsecond precision?
I've looked at the "time_val" command...
Hi, I appreciate your quick response.
I just couldn't read the values using normal editors, even after I replaced "w" to "wt" or "wb". Ideally I'll like to write the values as integers (just like...
Hi there,
I'm trying to use the "fwrite" command to write some values to a data file. However, when I tried to read the text (integers) from the data file, the resulting values in the file...