home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / amiga / programm / 17947 < prev    next >
Encoding:
Text File  |  1992-12-30  |  1.3 KB  |  48 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!newsflash.concordia.ca!mizar.cc.umanitoba.ca!umbadiu0
  3. From: umbadiu0@ccu.umanitoba.ca (Ted Babiuk)
  4. Subject: Simple C question
  5. Message-ID: <C02JCH.pC@ccu.umanitoba.ca>
  6. Keywords: PLEASE RESPOND ASAP ;) (vaction almost  over....:) )
  7. Sender: news@ccu.umanitoba.ca
  8. Nntp-Posting-Host: ccu.umanitoba.ca
  9. Organization: University of Manitoba, Winnipeg, Canada
  10. Date: Wed, 30 Dec 1992 10:48:17 GMT
  11. Lines: 35
  12.  
  13.  
  14. Ok....I'm using Lattice/SAS C 5.10 and have done the following...
  15.  
  16. A have a main program which creates a child task using createtask()....
  17.  
  18. The child task runs TO FASSST! (its a color cycling routine....)
  19.  
  20. I've  tried using a Delay(x) or wait(x) function to slow it down and make
  21. it delay/wait...but this either stops the task entirely (no cycling
  22. occures?...strange.....with Delay(10) i believe....) or crashes the
  23. system....:(...
  24.  
  25. I've been able to do it with a loop as follows:
  26.  
  27. for (count=0;count<8000;count++);
  28. ......
  29. cycle colors....etc.
  30.  
  31.  
  32. BUT this takes processor time.....
  33.  
  34. I could use the timer.device to do a timed wait but...
  35.  
  36. there must be an easier way.....
  37.  
  38. is there something simular to a sleep() command which puts a task to sleep
  39. for 'x' ticks? (and uses little/no cpu time?)
  40.  
  41. Thanks in advance,
  42.  
  43. Ted Badiuk
  44. umbadiu0@ccu.umanitoba.ca
  45.  
  46. No sig.....Band width friendly.....:)
  47.  
  48.