Utility functions and objects


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.


Classes

class  Wefts::ThreadPtr< _T >
 Implements a very fast thread specific data. More...


Functions

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

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


Function Documentation

bool Sleep double  seconds  )  [inline]
 

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 Sleep long  seconds,
long  nanoseconds
[inline]
 

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 Tue Oct 5 14:57:01 2004 for Wefts by doxygen 1.3.7