Temporization inside CUDA kernel

Dear CUDA developers,

is there a way to temporize code portion inside CUDA kernel? An example:

global void mykernel(){

start_time1

end_time1

start_time2

end_time2

}

If is not possibile, I think It should be a greater improovement if it will be supported.

Thanks

Maybe the clock() function can help you out: http://docs.nvidia.com/cuda/cuda-c-programming-guide/#time-function