Subversion Repositories programming

Rev

Rev 412 | Rev 415 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 412 Rev 413
Line 26... Line 26...
26
 
26
 
27
class Process
27
class Process
28
{
28
{
29
    public final String name;
29
    public final String name;
30
    public final int timeslice;
30
    public final int timeslice;
-
 
31
    public int started_at = 0;
-
 
32
    public int finished_at = 0;
-
 
33
    public int waited = 0;
-
 
34
    public int time_left;
31
 
35
 
32
    public Process (String name, int timeslice)
36
    public Process (String name, int timeslice)
33
    {
37
    {
34
        this.name = name;
38
        this.name = name;
35
        this.timeslice = timeslice;
39
        this.timeslice = timeslice;
-
 
40
        this.time_left = timeslice;
-
 
41
    }
-
 
42
 
-
 
43
    public Process (Process p)
-
 
44
    {
-
 
45
        this.name = new String (p.name);
-
 
46
        this.timeslice = p.timeslice;
-
 
47
        this.time_left = p.timeslice;
36
    }
48
    }
37
 
49
 
38
    public String toString ()
50
    public String toString ()
39
    {
51
    {
40
        return name.toString() + " " + timeslice;
52
        return name.toString() + " " + timeslice;
41
    }
53
    }
-
 
54
 
-
 
55
    public boolean equals (Process rhs)
-
 
56
    {
-
 
57
        return (this.name == rhs.name) && (this.timeslice == rhs.timeslice);
-
 
58
    }
42
}
59
}
43
 
60
 
44
/* vim: set ts=4 sts=4 sw=4 expandtab: */
61
/* vim: set ts=4 sts=4 sw=4 expandtab: */
45
 
62