Thread: Quick Delays

  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    19

    Exclamation Quick Delays

    I need a way to cause a delay in a program that can vary from 0.000125 seconds to .5 seconds, therefore giving me between 2000 samples per second and 2 respectively. Without a sleep I max out just over 2000 samples per second, but as soon as I put some sort of delay or sleep in I barely get 50 samples per second. I have tried nanosleep and the best I got was 50 samples per second.

    OS = Linux Kernel
    Compiler = gcc

    Thanks for any help you can offer

  2. #2
    Registered User codingmaster's Avatar
    Join Date
    Sep 2002
    Posts
    309
    don't open new threads, when you have talked about the same problem in another thread, which isn't older than a day.....

    http://cboard.cprogramming.com/showt...threadid=41733

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. strcmp returning 1...
    By Axel in forum C Programming
    Replies: 12
    Last Post: 09-08-2006, 07:48 PM
  2. Do you know...
    By davejigsaw in forum C++ Programming
    Replies: 1
    Last Post: 05-10-2005, 10:33 AM
  3. recursive quick sort - stack overflow
    By Micko in forum C Programming
    Replies: 9
    Last Post: 01-01-2005, 05:51 PM
  4. Questions on basic Quick Sort
    By Weng in forum C++ Programming
    Replies: 4
    Last Post: 12-16-2003, 10:06 AM
  5. Quick Sort Help
    By NavyBlue in forum C Programming
    Replies: 1
    Last Post: 03-02-2003, 10:34 PM