mirror of
https://github.com/BoredDevNL/BoredOS.git
synced 2026-05-15 18:58:40 +00:00
Compare commits
No commits in common. "2580700ff928e2bceb68c88848530dae882c66d1" and "11593b1b2384ae1199dc1fbe743ddc5499d3ba7d" have entirely different histories.
2580700ff9
...
11593b1b23
3 changed files with 8 additions and 9 deletions
|
|
@ -20,7 +20,7 @@ $(if $(filter doom,$1),$(APP_METADATA_SOURCE_DOOM),$(if $(filter lua,$1),$(APP_M
|
|||
endef
|
||||
|
||||
LIBC_SOURCES = $(wildcard libc/*.c)
|
||||
LIBC_OBJS = $(patsubst libc/%.c, $(BIN_DIR)/libc_%.o, $(LIBC_SOURCES)) $(BIN_DIR)/crt0.o $(BIN_DIR)/libwidget.o $(BIN_DIR)/stb_image.o
|
||||
LIBC_OBJS = $(patsubst libc/%.c, $(BIN_DIR)/%.o, $(LIBC_SOURCES)) $(BIN_DIR)/crt0.o $(BIN_DIR)/libwidget.o $(BIN_DIR)/stb_image.o
|
||||
|
||||
VPATH = cli gui sys games libc net cli/third_party
|
||||
vpath %.c cli gui sys games libc net cli/third_party
|
||||
|
|
@ -46,7 +46,7 @@ $(BIN_DIR):
|
|||
$(BIN_DIR)/crt0.o: crt0.asm
|
||||
$(AS) -f elf64 $< -o $@
|
||||
|
||||
$(BIN_DIR)/libc_%.o: libc/%.c | $(BIN_DIR)
|
||||
$(BIN_DIR)/%.o: libc/%.c | $(BIN_DIR)
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(BIN_DIR)/libwidget.o: ../wm/libwidget.c | $(BIN_DIR)
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ int main(int argc, char **argv) {
|
|||
printf("clear - Clear the screen\n");
|
||||
printf("exit - Exit the terminal\n");
|
||||
printf("net - Network tools\n");
|
||||
printf("time <cmd> - Measure command execution time\n");
|
||||
printf("ptime <cmd> - Measure command execution time\n");
|
||||
printf("\nHint: Use Ctrl+C to force quit any running application.\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
// This software is released under the GNU General Public License v3.0. See LICENSE file for details.
|
||||
// This header needs to maintain in any file it is present in, as per the GPL license terms.
|
||||
|
||||
#include "stdlib.h"
|
||||
#include "syscall.h"
|
||||
#include "../libc/stdlib.h"
|
||||
|
||||
#define CMDLINE_MAX 512
|
||||
|
||||
|
|
@ -41,12 +40,12 @@ static int ends_with_elf(const char *s) {
|
|||
}
|
||||
|
||||
static void print_usage(void) {
|
||||
printf("Usage: time <command> [args...]\n");
|
||||
printf("Usage: ptime <command> [args...]\n");
|
||||
printf("\n");
|
||||
printf("Examples:\n");
|
||||
printf(" time ls\n");
|
||||
printf(" time hexdump file.txt\n");
|
||||
printf(" time /bin/hexdump.elf file.txt\n");
|
||||
printf(" ptime ls\n");
|
||||
printf(" ptime hexdump file.txt\n");
|
||||
printf(" ptime /bin/hexdump.elf file.txt\n");
|
||||
}
|
||||
|
||||
// Read the system uptime in milliseconds by reading /proc/uptime and parsing the first number (seconds).
|
||||
Loading…
Reference in a new issue