mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 02:23:02 +01:00
Use long int instead uint64_t
This commit is contained in:
parent
27a31a8399
commit
57b52f35b4
@ -93,7 +93,8 @@ endif
|
|||||||
all: toxic
|
all: toxic
|
||||||
|
|
||||||
toxic: $(OBJ)
|
toxic: $(OBJ)
|
||||||
$(CC) $(CFLAGS) -o toxic $(OBJ) $(LDFLAGS)
|
@echo " LD $@"
|
||||||
|
@$(CC) $(CFLAGS) -o toxic $(OBJ) $(LDFLAGS)
|
||||||
|
|
||||||
install: toxic
|
install: toxic
|
||||||
mkdir -p $(abspath $(DESTDIR)/$(BINDIR))
|
mkdir -p $(abspath $(DESTDIR)/$(BINDIR))
|
||||||
@ -117,8 +118,9 @@ install: toxic
|
|||||||
done
|
done
|
||||||
|
|
||||||
%.o: $(SRC_DIR)/%.c
|
%.o: $(SRC_DIR)/%.c
|
||||||
$(CC) $(CFLAGS) -o $*.o -c $(SRC_DIR)/$*.c
|
@echo " CC $@"
|
||||||
$(CC) -MM $(CFLAGS) $(SRC_DIR)/$*.c > $*.d
|
@$(CC) $(CFLAGS) -o $*.o -c $(SRC_DIR)/$*.c
|
||||||
|
@$(CC) -MM $(CFLAGS) $(SRC_DIR)/$*.c > $*.d
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf *.d *.o toxic
|
rm -rf *.d *.o toxic
|
||||||
|
@ -73,9 +73,9 @@ void get_elapsed_time_str(char *buf, int bufsize, uint64_t secs)
|
|||||||
if (!secs)
|
if (!secs)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint64_t seconds = secs % 60;
|
long int seconds = secs % 60;
|
||||||
uint64_t minutes = (secs % 3600) / 60;
|
long int minutes = (secs % 3600) / 60;
|
||||||
uint64_t hours = secs / 3600;
|
long int hours = secs / 3600;
|
||||||
|
|
||||||
if (!minutes && !hours)
|
if (!minutes && !hours)
|
||||||
snprintf(buf, bufsize, "%.2ld", seconds);
|
snprintf(buf, bufsize, "%.2ld", seconds);
|
||||||
|
Loading…
Reference in New Issue
Block a user