package me.haosdent.cgroup.subsystem;

import me.haosdent.cgroup.manage.Group;
import me.haosdent.cgroup.util.Constants;

public class Cpu extends Common {

  public static final int subsystem = Constants.SUBSYS_CPU;

  public Cpu(Group group) {
    super(group);
  }

  public void setShares() {}

  public void setCfsPeriodTime() {}

  public void setCfsQuotaTime() {}

  public void setRtPeriodTime() {}

  public void setRtRuntimeTime() {}

  public void getStat() {}
}

@@ -115,16 +115,45 @@
 tants;%0A%0A
+import java.io.IOException;%0A%0A
 public c
@@ -209,295 +209,1599 @@
 int 
-subsystem = Constants.SUBSYS_CPU;%0A%0A  public Cpu(Group group) %7B%0A    super(group);%0A  %7D%0A%0A  public void setShares() %7B%7D%0A%0A  public void setCfsPeriodTime() %7B%7D%0A%0A  public void setCfsQuotaTime() %7B%7D%0A%0A  public void setRtPeriodTime() %7B%7D%0A%0A  public void setRtRuntimeTime() %7B%7D%0A%0A  public void getStat() %7B
+SUBSYS = Constants.SUBSYS_CPU;%0A  public static final String PROP_CPU_CFS_PERIOD_US = %22cpu.cfs_period_us%22;%0A  public static final String PROP_CPU_CFS_QUOTA_US = %22cpu.cfs_quota_us%22;%0A  public static final String PROP_CPU_STAT = %22cpu.stat%22;%0A  public static final String PROP_CPU_SHARES = %22cpu.shares%22;%0A  public static final String PROP_CPU_RT_PERIOD_US = %22cpu.rt_period_us%22;%0A  public static final String PROP_CPU_RT_RUNTIME_US = %22cpu.rt_runtime_us%22;%0A%0A  public Cpu(Group group) %7B%0A    super(group);%0A  %7D%0A%0A  public static class Stat %7B%0A    public final int nrPeriods;%0A    public final int nrThrottled;%0A    public final int throttledTime;%0A%0A    public Stat(String statStr) %7B%0A      this.nrPeriods = 1;%0A      this.nrThrottled = 1;%0A      this.throttledTime = 1;%0A    %7D%0A  %7D%0A%0A  public void setShares(int shares) throws IOException %7B%0A    shell.cgset(group.getName(), PROP_CPU_SHARES, shares + %22%22);%0A  %7D%0A%0A  public void setCfsPeriodTime(long time) throws IOException %7B%0A    shell.cgset(group.getName(), PROP_CPU_CFS_PERIOD_US, time + %22%22);%0A  %7D%0A%0A  public void setCfsQuotaTime(long time) throws IOException %7B%0A    shell.cgset(group.getName(), PROP_CPU_CFS_QUOTA_US, time + %22%22);%0A  %7D%0A%0A  public void setRtPeriodTime(long time) throws IOException %7B%0A    shell.cgset(group.getName(), PROP_CPU_RT_PERIOD_US, time + %22%22);%0A  %7D%0A%0A  public void setRtRuntimeTime(long time) throws IOException %7B%0A    shell.cgset(group.getName(), PROP_CPU_RT_RUNTIME_US, time + %22%22);%0A  %7D%0A%0A  public Stat getStat() throws IOException %7B%0A    String result = shell.cgget(group.getName(), PROP_CPU_STAT);%0A    Stat stat = new Stat(result);%0A    return stat;%0A  
 %7D%0A%7D%0A

Implement functions in Cpu.java