本文整理汇总了C++中Monitor::GetLastWriteIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ Monitor::GetLastWriteIndex方法的具体用法?C++ Monitor::GetLastWriteIndex怎么用?C++ Monitor::GetLastWriteIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Monitor
的用法示例。
在下文中一共展示了Monitor::GetLastWriteIndex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
{
struct timeval timestamp = monitor->GetTimestamp( image_idx );
if ( verbose )
{
char timestamp_str[64] = "None";
if ( timestamp.tv_sec )
strftime( timestamp_str, sizeof(timestamp_str), "%Y-%m-%d %H:%M:%S", localtime( ×tamp.tv_sec ) );
if ( image_idx == -1 )
printf( "Time of last image capture: %s.%02ld\n", timestamp_str, timestamp.tv_usec/10000 );
else
printf( "Time of image %d capture: %s.%02ld\n", image_idx, timestamp_str, timestamp.tv_usec/10000 );
}
else
{
if ( have_output ) printf( "%c", separator );
printf( "%ld.%02ld", timestamp.tv_sec, timestamp.tv_usec/10000 );
have_output = true;
}
}
if ( function & ZMU_READ_IDX )
{
if ( verbose )
printf( "Last read index: %d\n", monitor->GetLastReadIndex() );
else
{
if ( have_output ) printf( "%c", separator );
printf( "%d", monitor->GetLastReadIndex() );
have_output = true;
}
}
if ( function & ZMU_WRITE_IDX )
{
if ( verbose )
printf( "Last write index: %d\n", monitor->GetLastWriteIndex() );
else
{
if ( have_output ) printf( "%c", separator );
printf( "%d", monitor->GetLastWriteIndex() );
have_output = true;
}
}
if ( function & ZMU_EVENT )
{
if ( verbose )
printf( "Last event id: %d\n", monitor->GetLastEvent() );
else
{
if ( have_output ) printf( "%c", separator );
printf( "%d", monitor->GetLastEvent() );
have_output = true;
}
}
if ( function & ZMU_FPS )
{
if ( verbose )
printf( "Current capture rate: %.2f frames per second\n", monitor->GetFPS() );
else
{
if ( have_output ) printf( "%c", separator );
printf( "%.2f", monitor->GetFPS() );
have_output = true;
}
}
if ( function & ZMU_IMAGE )
{
if ( verbose )