Search:

Type: Posts; User: kenkoh

Search: Search took 0.00 seconds.

  1. Replies
    14
    Views
    11,638

    Can anyone kindly advise me if I've done...

    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...
  2. Replies
    14
    Views
    11,638

    Thanks for the suggestion. However, I'm not using...

    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...
  3. Replies
    14
    Views
    11,638

    Thanks for the response. In fact I do not need...

    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...
  4. Replies
    14
    Views
    11,638

    Need advice to provide accurate time delay in C

    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...
  5. Hi Salem, Thanks for your comments. Yes,...

    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...
  6. Need help on multithreading - receiving and storing data in parallel

    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...
  7. Replies
    3
    Views
    3,184

    Need help with pthread (multi-threading)

    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)....
  8. Replies
    9
    Views
    7,029

    Can I ask if anyone tried using the command...

    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...
  9. Replies
    9
    Views
    7,029

    High performance timers? Anything for Linux...

    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...
  10. Replies
    9
    Views
    7,029

    Determine process time in microseconds

    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...
  11. Replies
    10
    Views
    5,127

    Hi, I appreciate your quick response. I just...

    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...
  12. Replies
    10
    Views
    5,127

    Problem using fwrite

    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...
Results 1 to 12 of 12