To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 7338
7337  |  7339
Subject: 
multitasking
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Sat, 22 Jan 2000 21:10:42 GMT
Viewed: 
1033 times
  
How clever is the multitasking in IC?  If I have a task that I only want to run
ever 10 seconds, can I just put a sleep statement at the top of the routine?
Will the sleep statement chew up processor cycles, or will IC realize that it
should defer to the next task until the sleep time is over?

-Scott Harris



Message has 1 Reply:
  Re: multitasking
 
In my reading of it, it will just chew the cycles. Here is the routine msleep(), used to implement sleep. See how it just does a busy wait? I wrote a version (now gone into data heaven when my drive crashed) that would check the time, and then give (...) (25 years ago, 22-Jan-00, to lugnet.robotics.handyboard)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR