home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / pibterm / pibt41s1.arc / GIVEAWAY.MOD < prev    next >
Text File  |  1988-02-02  |  2KB  |  36 lines

  1. (*--------------------------------------------------------------------------*)
  2. (*            GiveAwayTime --- gives away time slices to other task         *)
  3. (*--------------------------------------------------------------------------*)
  4.  
  5. PROCEDURE GiveAwayTime( NSlices : INTEGER );
  6.  
  7. (*--------------------------------------------------------------------------*)
  8. (*                                                                          *)
  9. (*    Procedure:  GiveAwayTime;                                             *)
  10. (*                                                                          *)
  11. (*    Purpose:    Gives away time slices to other tasks                     *)
  12. (*                                                                          *)
  13. (*    Calling Sequence:                                                     *)
  14. (*                                                                          *)
  15. (*       GiveAwayTime( NSlices :  INTEGER );                                *)
  16. (*                                                                          *)
  17. (*          NSlices --- # of slices (55 ms) to give away, if DoubleDos.     *)
  18. (*                                                                          *)
  19. (*    Calls:  GiveUpTime                                                    *)
  20. (*                                                                          *)
  21. (*--------------------------------------------------------------------------*)
  22.  
  23. VAR
  24.    Regs : Registers;
  25.  
  26. BEGIN (* GiveAwayTime *)
  27.                                    (* If printing a file, do that, *)
  28.                                    (* else actually donate time to *)
  29.                                    (* other partitions.            *)
  30.    IF Print_Spooling THEN
  31.       Print_Spooled_File
  32.    ELSE
  33.       GiveUpTime( NSlices );
  34.  
  35. END   (* GiveAwayTime *);
  36.