示例#1
0
文件: SocketImpl.cpp 项目: 12307/poco
void SocketImpl::setOption(int level, int option, const Poco::Timespan& value)
{
	struct timeval tv;
	tv.tv_sec  = (long) value.totalSeconds();
	tv.tv_usec = (long) value.useconds();
	
	setRawOption(level, option, &tv, sizeof(tv));
}
示例#2
0
文件: timeline.cpp 项目: rmnzr/murmur
//--------------------------------------------------------------
int Timeline::M_getElapsedSeconds()
{
	Poco::DateTime now = nowLocal();
	if (now > m_dateStart){
		Poco::Timespan delta = now-m_dateStart;
		return delta.totalSeconds();
	}
	return 0;
}