// ClockGettime implements linux syscall clock_gettime(2).
ClockGettime implements linux syscall clock_gettime(2).
// ClockGettime implements linux syscall clock_gettime ( 2 ) .
func ClockGettime(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error) {
	clockID := int32(args[0].Int())
	addr := args[1].Pointer()
	c, err := getClock(t, clockID)
	if err != nil {
		return 0, nil, err
	}
	ts := c.Now().Timespec()
	return 0, nil, copyTimespecOut(t, addr, &ts)
}
func ClockGettime ( t * kernel . Task , args arch . SyscallArguments ) ( uintptr , * kernel . SyscallControl , error ) { clockID := int32 ( args [ 0 ] . Int ( ) ) addr := args [ 1 ] . Pointer ( ) c , err := getClock ( t , clockID ) if err != nil { return 0 , nil , err } ts := c . Now ( ) . Timespec ( ) return 0 , nil , copyTimespecOut ( t , addr , & ts ) }
ClockGettime implements linux syscall clock_gettime(2).
ClockGettime implements linux syscall clock_gettime ( 2 ) .