The %PerfTime system variable in PeopleCode retrieves the local system clock time of the application server with millisecond precision, which is primarily used to measure the elapsed execution time of code blocks, unlike %Time which queries the database server.