This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CXX = g++ | |
| LINKER = g++ | |
| AR = ar cr | |
| LINKER_SO = g++ -shared | |
| # package name | |
| PACKAGE = $(shell basename $(shell pwd)) | |
| # platform | |
| PLATFORM = $(shell uname -s) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // calculates addition of positive arguments | |
| void add(const timeval& a, const timeval& b, timeval& result) | |
| { | |
| result.tv_sec = a.tv_sec + b.tv_sec; | |
| result.tv_usec = a.tv_usec + b.tv_usec; | |
| if (result.tv_usec >= 1000000) | |
| { | |
| result.tv_sec++; | |
| result.tv_usec -= 1000000; | |
| } |