├── System call.pdf ├── Installation.pdf ├── README.md └── Systemcall.c /System call.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sisay-8926/macOs-ventura-installation/HEAD/System call.pdf -------------------------------------------------------------------------------- /Installation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sisay-8926/macOs-ventura-installation/HEAD/Installation.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # macOs-ventura-installation 2 | 3 | ## Installtion documentation 4 | 5 | focuses on macOS Ventura. It covers the OS's features, hardware/software requirements, 6 | advantages, disadvantages, and includes sections on virtualization 7 | in modern operating systems. The report concludes with future outlooks and recommendations 8 | for users. 9 | ## System call documentation 10 | focusing on implementing the gettimeofday() system call in C on macOS Ventura. It includes 11 | a code example demonstrating how to retrieve and print time with microsecond precision. 12 | -------------------------------------------------------------------------------- /Systemcall.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int gettimeofday(struct timeval *tv, void *tz) { 5 | if (tv) { 6 | // Get current time from Mach absolute time 7 | uint64_t now = mach_absolute_time(); 8 | 9 | // Convert Mach time to nanoseconds 10 | mach_timebase_info_data_t timebase; 11 | mach_timebase_info(&timebase); 12 | uint64_t nanos = now * timebase.numer / timebase.denom; 13 | 14 | // Convert to timeval 15 | tv->tv_sec = nanos / NSEC_PER_SEC; 16 | tv->tv_usec = (nanos % NSEC_PER_SEC) / 1000; 17 | } 18 | 19 | // macOS ignores the timezone parameter 20 | if (tz) { 21 | // On macOS, this would typically be set to NULL 22 | } 23 | 24 | return 0; 25 | } 26 | 27 | 28 | --------------------------------------------------------------------------------