예제 #1
0
파일: my_time.cpp 프로젝트: vi-k/whoisalive
posix_time::time_duration div(
	const posix_time::time_duration &time,
	double divisor)
{
	return posix_time::time_duration(0, 0, 0,
		posix_time::time_duration::fractional_seconds_type(
			(double)time.ticks() / divisor + 0.5));
}
예제 #2
0
파일: my_time.cpp 프로젝트: vi-k/whoisalive
posix_time::time_duration mul(
	const posix_time::time_duration &time,
	double rhs)
{
	return posix_time::time_duration(0, 0, 0,
		posix_time::time_duration::fractional_seconds_type(
			(double)time.ticks() * rhs + 0.5));
}
예제 #3
0
파일: my_time.cpp 프로젝트: vi-k/whoisalive
double div(
	const posix_time::time_duration &time1,
	const posix_time::time_duration &time2)
{
	return (double)time1.ticks() / (double)time2.ticks();
}