GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  REST (3)

NAME

rest - Waits a specified number of milliseconds or yields CPU. Allegro game programming library.

CONTENTS

Synopsis
Description
See Also

SYNOPSIS

#include <allegro.h>

void rest(unsigned int time);

DESCRIPTION

This function waits for the specified number of milliseconds.

Passing 0 as parameter will not wait, but just yield. This can be useful in order to "play nice" with other processes. Other values will cause CPU time to be dropped on most platforms. This will look better to users, and also does things like saving battery power and making fans less noisy.

Note that calling this inside your active game loop is a bad idea, as you never know when the OS will give you the CPU back, so you could end up missing the vertical retrace and skipping frames. On the other hand, on multitasking operating systems it is good form to give up the CPU for a while if you will not be using it.

SEE ALSO

install_timer(3), rest_callback(3), vsync(3), d_yield_proc(3)
Search for    or go to Top of page |  Section 3 |  Main Index


Allegro REST (3) version 4.4.2

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.