Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

timeval2bintime(9) [netbsd man page]

BINTIME_ADD(9)						   BSD Kernel Developer's Manual					    BINTIME_ADD(9)

NAME
bintime_add -- operations on ``bintime'' SYNOPSIS
#include <sys/time.h> vid bintime_add(struct bintime *bt, const struct bintime *bt2); void bintime_addx(struct bintime *bt, uint64_t x); void bintime_sub(struct bintime *bt, const struct bintime *bt2); void bintime2timespec(const struct bintime *bt, struct timespec *ts); void timespec2bintime(const struct timespec *ts, struct bintime *bt); void bintime2timeval(const struct bintime *bt, struct timeval *tv); void timeval2bintime(const struct timeval *tv, struct bintime *bt); DESCRIPTION
These functions are provided for convenience as part of the machine-independent timecounter(9) framework. All of them operate with the bintime structure. The function bintime_add() adds the time information stored in bt2 to bt. Conversely, bintime_sub() subtracts bt2 from bt. The bintime_addx() function stores the fraction of a second x to bt. Like the function names bespeak, bintime2timespec() converts the bintime structure to struct timespec and timespec2bintime() does the oppo- site. The functions bintime2timeval() and timeval2bintime() operate with struct timeval instead. The result is stored to the right-hand side. SEE ALSO
timeradd(3), timeval(3), bintime(9), timecounter(9) BSD
June 8, 2010 BSD

Check Out this Related Man Page

BINTIME_ADD(9)						   BSD Kernel Developer's Manual					    BINTIME_ADD(9)

NAME
bintime_add -- operations on ``bintime'' SYNOPSIS
#include <sys/time.h> vid bintime_add(struct bintime *bt, const struct bintime *bt2); void bintime_addx(struct bintime *bt, uint64_t x); void bintime_sub(struct bintime *bt, const struct bintime *bt2); void bintime2timespec(const struct bintime *bt, struct timespec *ts); void timespec2bintime(const struct timespec *ts, struct bintime *bt); void bintime2timeval(const struct bintime *bt, struct timeval *tv); void timeval2bintime(const struct timeval *tv, struct bintime *bt); DESCRIPTION
These functions are provided for convenience as part of the machine-independent timecounter(9) framework. All of them operate with the bintime structure. The function bintime_add() adds the time information stored in bt2 to bt. Conversely, bintime_sub() subtracts bt2 from bt. The bintime_addx() function stores the fraction of a second x to bt. Like the function names bespeak, bintime2timespec() converts the bintime structure to struct timespec and timespec2bintime() does the oppo- site. The functions bintime2timeval() and timeval2bintime() operate with struct timeval instead. The result is stored to the right-hand side. SEE ALSO
timeradd(3), timeval(3), bintime(9), timecounter(9) BSD
June 8, 2010 BSD
Man Page

5 More Discussions You Might Find Interesting

1. Programming

struct tm problem

I receive an integer as argument for a function. within function definition i want it to be of type struct tm. eg.. main() { int a; ...... } function(...,..,a,..) int a; { struct tm tm; if(!a) ^ time(&a); ^ ... (4 Replies)
Discussion started by: bankpro
4 Replies

2. UNIX for Dummies Questions & Answers

How to access a struct within a struct?

Can someone tell me how to do this? Just a thought that entered my mind when learning about structs. First thought was: struct one { struct two; } struct two { three; } one->two->three would this be how you would access "three"? (1 Reply)
Discussion started by: unbelievable21
1 Replies

3. Homework & Coursework Questions

Passing pointers to struct

Hi, i'm trying to copy a struct into a binary file using the unix instruction write, so i declare and fill the struct "superbloque" in one function "initSB" and then i pass the pointer to another function called bwrite (for block write) which calls write. The problem is that i call the function... (2 Replies)
Discussion started by: ignatius3
2 Replies

4. Programming

Storing C++-struct in file - problem when adding new item in struct

Hi, I have received an application that stores some properties in a file. The existing struct looks like this: struct TData { UINT uSizeIncludingStrings; // copy of Telnet data struct UINT uSize; // basic properties: TCHAR szHost; //defined in Sshconfig UINT iPortNr; TCHAR... (2 Replies)
Discussion started by: Powerponken
2 Replies

5. Programming

Implementing function outside struct

I have this code where I have declared a struct with some functions. Trying to write the function implementation outside the struct declaration and do not know how to proceed. #ifndef ParseEl_hh #define ParseEl_hh #include <iostream> #include <fstream> #include "DynBaseObj.hh"... (7 Replies)
Discussion started by: kristinu
7 Replies