1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-13 02:03:03 +01:00

Merge pull request #181 from Ansa89/master

Use long int instead uint64_t
This commit is contained in:
JFreegman 2014-07-08 12:00:48 -04:00
commit e74212cb9e
2 changed files with 8 additions and 6 deletions

View File

@ -93,7 +93,8 @@ endif
all: toxic
toxic: $(OBJ)
$(CC) $(CFLAGS) -o toxic $(OBJ) $(LDFLAGS)
@echo " LD $@"
@$(CC) $(CFLAGS) -o toxic $(OBJ) $(LDFLAGS)
install: toxic
mkdir -p $(abspath $(DESTDIR)/$(BINDIR))
@ -117,8 +118,9 @@ install: toxic
done
%.o: $(SRC_DIR)/%.c
$(CC) $(CFLAGS) -o $*.o -c $(SRC_DIR)/$*.c
$(CC) -MM $(CFLAGS) $(SRC_DIR)/$*.c > $*.d
@echo " CC $@"
@$(CC) $(CFLAGS) -o $*.o -c $(SRC_DIR)/$*.c
@$(CC) -MM $(CFLAGS) $(SRC_DIR)/$*.c > $*.d
clean:
rm -rf *.d *.o toxic

View File

@ -73,9 +73,9 @@ void get_elapsed_time_str(char *buf, int bufsize, uint64_t secs)
if (!secs)
return;
uint64_t seconds = secs % 60;
uint64_t minutes = (secs % 3600) / 60;
uint64_t hours = secs / 3600;
long int seconds = secs % 60;
long int minutes = (secs % 3600) / 60;
long int hours = secs / 3600;
if (!minutes && !hours)
snprintf(buf, bufsize, "%.2ld", seconds);