Пример #1
0
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
//--------------------------------------------------------------
int Timeline::M_getElapsedSeconds()
{
	Poco::DateTime now = nowLocal();
	if (now > m_dateStart){
		Poco::Timespan delta = now-m_dateStart;
		return delta.totalSeconds();
	}
	return 0;
}