Back to index

libsfml  1.6+dfsg2
Static Public Member Functions
sf::priv::Platform Class Reference

Unix implementation fo Platform Give access to various global system functions /////////////////////////////////////////////////////////. More...

#include <Platform.hpp>

List of all members.

Static Public Member Functions

static double GetSystemTime ()
 Get the current system time.
static void Sleep (float Time)
 Suspend the execution of the current thread for a specified time.
static double GetSystemTime ()
 Get the current system time.
static void Sleep (float Time)
 Suspend the execution of the current thread for a specified time.

Detailed Description

Unix implementation fo Platform Give access to various global system functions /////////////////////////////////////////////////////////.

Win32 implementation of Platform. Gives access to various global system functions /////////////////////////////////////////////////////////.

Definition at line 43 of file Platform.hpp.


Member Function Documentation

double sf::priv::Platform::GetSystemTime ( ) [static]

Get the current system time.

Get the current system time /////////////////////////////////////////////////////////.

Returns:
System time, in seconds

/////////////////////////////////////////////////////////

Definition at line 39 of file Platform.cpp.

{
    timeval Time = {0, 0};
    gettimeofday(&Time, NULL);

    return Time.tv_sec + Time.tv_usec / 1000000.;
}
static double sf::priv::Platform::GetSystemTime ( ) [static]

Get the current system time.

Returns:
System time, in seconds

/////////////////////////////////////////////////////////

static void sf::priv::Platform::Sleep ( float  Time) [static]

Suspend the execution of the current thread for a specified time.

Parameters:
Time: Time to sleep, in seconds

/////////////////////////////////////////////////////////

void sf::priv::Platform::Sleep ( float  Time) [static]

Suspend the execution of the current thread for a specified time.

Suspend the execution of the current thread for a specified time /////////////////////////////////////////////////////////.

Parameters:
Time: Time to sleep, in seconds

/////////////////////////////////////////////////////////

Definition at line 51 of file Platform.cpp.

{
    usleep(static_cast<unsigned long>(Time * 1000000));
}

Here is the caller graph for this function:


The documentation for this class was generated from the following files: