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
NOW(3) libdill Library Functions NOW(3)

now - get current time


#include <libdill.h>
int64_t now(void);

    

Returns current time, in milliseconds.

The function is meant for creating deadlines. For example, a point of time one second from now can be expressed as now() + 1000.

The following values have special meaning and cannot be returned by the function:

0: Immediate deadline.
-1: Infinite deadline.

Current time.

None.


int result = chrecv(ch, &val, sizeof(val), now() + 1000);
if(result == -1 && errno == ETIMEDOUT) {
    printf("One second elapsed without receiving a message.\n");
}

    

msleep(3)
libdill

Search for    or go to Top of page |  Section 3 |  Main Index

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