Changeset 5031:ebd6fe192503 in roaraudio for roarclients/roarctl.c
- Timestamp:
- 05/28/11 14:23:32 (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roarclients/roarctl.c
r5005 r5031 123 123 "\n" 124 124 " serverinfo - Gets general information about the server\n" 125 " servertime - Gets server's time\n" 125 126 " serveroinfo - Gets Information about server output\n" 126 127 " serveroinfo2 DIR - Gets Information about server output for stream direction dir\n" … … 243 244 } 244 245 #undef _pm 246 247 void server_time (struct roar_connection * con) { 248 struct roar_time time; 249 250 if ( roar_get_time(con, &time) == -1 ) { 251 fprintf(stderr, "Error: can not get server time\n"); 252 return; 253 } 254 255 if ( g_verbose ) { 256 printf("Server time : %llu.%06llu [+%llu/2^64] sec\n", 257 (long long unsigned int)time.t_sec, 258 (long long unsigned int) time.t_ssec / 18446744073709LLU, 259 (long long unsigned int) time.t_ssec); 260 } else { 261 printf("Server time : %llu.%06llu sec\n", 262 (long long unsigned int)time.t_sec, 263 (long long unsigned int) time.t_ssec / 18446744073709LLU); 264 } 265 if ( time.c_freq ) 266 printf("Server clock frequency: %f Hz\n", (float)time.c_freq / 1000000000.f); 267 if ( time.c_drift ) 268 printf("Server clock drift : %llu:2^64 (~10^%f)\n", 269 (long long unsigned int)time.c_drift, logf((float)time.c_drift)/2.302585f); 270 } 245 271 246 272 void server_oinfo (struct roar_connection * con, int dir) { … … 1141 1167 } else if ( !strcmp(k, "serverinfo") ) { 1142 1168 server_info(&con); 1169 } else if ( !strcmp(k, "servertime") ) { 1170 server_time(&con); 1143 1171 } else if ( !strcmp(k, "serveroinfo") ) { 1144 1172 server_oinfo(&con, -1);
Note: See TracChangeset
for help on using the changeset viewer.