1 /* 2 * Copyright (c) 2008 The Native Client Authors. All rights reserved. 3 * Use of this source code is governed by a BSD-style license that can be 4 * found in the LICENSE file. 5 */ 6 7 /* 8 * It can't get much simpler than this (uh, except for noop.c). 9 */ 10 11 #include <stdio.h> 12 #include <time.h> 13 #include <sys/time.h> 14 loop()15void loop() { 16 int count = 0; 17 timespec t = {1, 0}; 18 while (1) { 19 printf("Running"); 20 int i = 0; 21 for (i = 0; i < count % 5; ++i) { 22 printf("."); 23 } 24 for (; i < 5; ++i) { 25 printf(" "); 26 } 27 printf("\r"); 28 fflush(stdout); 29 ++count; 30 nanosleep(&t, 0); 31 } 32 } 33 main(int argc,char * argv[])34int main(int argc, char* argv[]) { 35 loop(); 36 return 0; 37 } 38