Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

Utility functions and objects

Every library need a set of non-oop functions that help the developers in their task with a candy-grammar access to procedural aspects. More...

Compounds

class  ThreadPtr
 Implements a very fast thread specific data. More...


Functions

bool Sleep (long seconds, long nanoseconds)
 Sleeps a certain amount of time.

bool Sleep (double seconds)
 Sleeps a certain amount of time.


Detailed Description

Every library need a set of non-oop functions that help the developers in their task with a candy-grammar access to procedural aspects.

Even if this principle has been neglected by some fuorth generation languages (like Java or C#), this has been reaffirmed in fifth generation languages (like Python).

Wefts provides a small set of functions that does not require access to objects or classes, but are procedurally available in every thread or, in general, in every code using them.


Function Documentation

bool Wefts::Sleep double    seconds
 

Sleeps a certain amount of time.

Sleeps for a given amount of seconds (1.0 meaning one second, 0.5 half second and so on). The process calling this function will be awaken as soon as possible as the time is elapsed; this could also result in a noticeable delay. Also, it is possible that the process is awaken before the wait is elapsed; this may happen if a signal is issued to the process that is currently helding waiting threads.

Note:
Even if you use the command using namespace Wefts, this function won't clash with MS-Windows API Sleep(), as their prototype are different. Just remember that if you want to invoke Wefts::Sleep(), you have to use double parameter, that is dotted numbers as 1.0, never 1.
Parameters:
seconds  the wait time in seconds and second fractions.
Returns:
true if wait has elapsed without interruption, false otherwise.

bool Wefts::Sleep long    seconds,
long    nanoseconds
 

Sleeps a certain amount of time.

Sleeps for a given amount of seconds (that may be also 0), and of nanoseconds (up to 999,999,999, almost one second). The process calling this function will be awaken as soon as possible as the time is elapsed; this could also result in a noticeable delay. Also, it is possible that the process is awaken before the wait is elapsed; this may happen if a signal is issued to the process that is currently helding waiting threads.

Parameters:
seconds  the wait time in whole seconds (may be 0)
nanoseconds  wait time in nanoseconds ( up to one second).
Returns:
true if wait has elapsed without interruption, false otherwise.


Generated on Mon Aug 18 05:53:44 2003 for Wefts by doxygen1.2.18