关于CPU时间急问!# Unix - 噫吁兮,危乎高哉
m*t
1 楼
当计算一个program的CPU运行时间时,在Java中可在program开始和结束时
分别调用System.currentTimeMillis()并求得两者之差,为CPU时间.
类似地,在C/C++中可用time.h中的time函数来实现这一点.
我的问题是: 当server上有多个进程共享CPU, 用上面方法求得的CPU时间
是仅仅包括我的program在CPU自己运行的时间,还是也包括从我的program
运行开始到结束期间所有其他进程占据CPU的时间?
我的paper明天就要due,我现在正在统计实验数据.望哪位大下能迅速解答
我的问题,不胜感激!!!!!!
分别调用System.currentTimeMillis()并求得两者之差,为CPU时间.
类似地,在C/C++中可用time.h中的time函数来实现这一点.
我的问题是: 当server上有多个进程共享CPU, 用上面方法求得的CPU时间
是仅仅包括我的program在CPU自己运行的时间,还是也包括从我的program
运行开始到结束期间所有其他进程占据CPU的时间?
我的paper明天就要due,我现在正在统计实验数据.望哪位大下能迅速解答
我的问题,不胜感激!!!!!!