📄 processustime.java
字号:
package fr.umlv.projet.procfs;/** * Describe the information of time of cpu when the processus runs. * @author Owner MA Xiao Jun & HUANG Wei. * @see fr.umlv.projet.procfs.CpuTime */public class ProcessusTime { private int pid; private float oldctime = 0.0f; private float oldstime = 0.0f; private long oldtime = 0; public ProcessusTime(int pid,float oldctime,float oldstime,long oldtime){ this.pid = pid; this.oldctime = oldctime; this.oldstime = oldstime; this.oldtime = oldtime; } /** * Return the oldctime of cpu used by processus. * @return value of oldctime. */ public float getOldctime() { return oldctime; } /** * Change the oldctime of cpu used by processus. * @param oldctime the new value of oldctime. */ public void setOldctime(float oldctime) { this.oldctime = oldctime; } /** * Return the oldstime of cpu used by processus. * @return value of oldstime. */ public float getOldstime() { return oldstime; } /** * Change the oldstime of cpu used by processus. * @param oldstime the new value of oldstime. */ public void setOldstime(float oldstime) { this.oldstime = oldstime; } /** * Return the oldtime of cpu used by processus. * @return value of oldtime. */ public long getOldtime() { return oldtime; } /** * Change the oldtime of cpu used by processus. * @param oldtime the new value of oldtime. */ public void setOldtime(long oldtime) { this.oldtime = oldtime; } /** * Return the id of processus. * @return pid. */ public int getPid(){ return pid; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -