.\" (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" License. .\" Modified Sat Jul 24 21:27:01 1993 by Rik Faith (faith@cs.unc.edu) .\" .\" Traducido al castellano (con permiso) por: .\" Sebastian Desimone (chipy@argenet.com.ar) (desimone@fasta.edu.ar) .\" Translation revised May 5 1998 by Rafael Rios (rafarios@arrakis.es) .\" Translation revised Tue Apr 18 2000 by Juan Piernas .\" .TH CLOCK 3 "21 abril 1993" "GNU" "Manual del Programador de Linux" .SH NOMBRE clock \- Determina el tiempo de uso del procesador .SH SINOPSIS .nf .B #include .sp .B clock_t clock(void); .fi .SH DESCRIPCIÓN La función .B clock() devuelve una aproximación del tiempo del procesador usado por el programa. .SH "VALOR DEVUELTO" El valor devuelto es el tiempo de CPU usado medido en .BR clock_t ; para obtener el equivalente en segundos, divida el valor devuelto por .BR CLOCKS_PER_SEC . .SH "CONFORME A" ANSI C. POSIX necesita que CLOCKS_PER_SEC sea igual a 1000000 independientemente de la resolución real. .SH "FALLOS" El C estándar permite que la función devuelva valores arbitrarios al comienzo del programa. Tome la diferencia entre el valor devuelto por una llamada .B clock() al comienzo y el final del programa para obtener la máxima portabilidad. .PP Dese cuenta que el tiempo puede volver a ser 0. En un sistema de 32 bits donde CLOCKS_PER_SEC es igual a 1000000, esta función devolverá el mismo valor cada 72 minutos, aproximadamente. .PP La función .B times() devuelve más información. .SH "VÉASE TAMBIÉN" .BR times (2)