removed code without effect
authorMarkus Brökers <mbroeker@largo.homelinux.org>
Sun, 29 Aug 2010 16:36:19 +0200
changeset 145 63a5269fb113
parent 144 f064cd793f8d
child 146 0ffa20c26b2d
removed code without effect time_t represents the number of seconds since the birth of unix. to deal with microseconds and friends, use a) gettimeofday b) struct timeval
Makefile
sts.c
--- a/Makefile
+++ b/Makefile
@@ -359,7 +359,7 @@
 
 sts: sts.o
 	@echo Linking $<...
-	@$(CC) -Wall -O2 -lm -g -ggdb $(LDFLAGS) $< -o $@
+	@$(CC) -Wall -O2 -g -ggdb $(LDFLAGS) $< -o $@
 
 .PHONY: beauty clean uninstall
 
--- a/sts.c
+++ b/sts.c
@@ -6,7 +6,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <math.h>
 #include <time.h>
 #include <errno.h>
 
@@ -20,15 +19,13 @@
 {
     time_t sec = 0;
     time_t milli = 0;
-    double value;
 
     if (sscanf (buf, "%ld.%ld", &sec, &milli) != 2) {
         fprintf (stderr, "  sec: %ld, ", sec);
         fprintf (stderr, "milli: %ld\n", milli);
     }
 
-    value = (milli / 1000000);
-    return sec + (time_t) (floor (value));
+    return sec;
 }
 
 time_t getboottime ()