viewTicks.cpp

00001 /*
00002   タイムスタンプの表示
00003   Satofumi KAMIMURA
00004   $Id$
00005 */
00006 
00007 #include "mRunCtrl.h"
00008 #include "mURGCtrl.h"
00009 #include "vutils.h"
00010 
00011 
00012 int main(int argc, char *argv[]) {
00013   try {
00014     mRunCtrl run;
00015     mURGCtrl urg;
00016     if ((initConnection(&run, argc, argv) < 0) ||
00017         (initConnection(&urg, argc, argv, false) < 0)) {
00018       exit(1);
00019     }
00020     urg.setOwnCrdToObject(&run);
00021 
00022     fprintf(stderr, "begin\n");
00023     unsigned long begin_ticks = VXV::GetTicks();
00024     run.adjustSubTreeTicks(0);
00025 
00026     urg.capture();
00027     long urg_ticks = urg.crd_ticks;
00028     long run_ticks = run.crd_ticks;
00029     long now_ticks = VXV::GetTicks() - begin_ticks;
00030 
00031     printf("urg: %ld, run: %ld, now: %ld\n", urg_ticks, run_ticks, now_ticks);
00032 
00033   } catch (std::exception& e) {
00034     printf("exception: %s\n", e.what());
00035   }
00036   return 0;
00037 }
00038 

Generated on Mon Apr 13 22:52:02 2009 by  doxygen 1.5.7.1