public Time add int adds int SumSec SecAdd Time rez new Time SumSec Se

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
public Time add(int adds)
{
int SumSec, SecAdd;
Time rez = new Time(0, 0, 0);
SumSec = Seconds + Minutes * 60 + Hours * 3600;
SecAdd = SumSec + adds;
rez.Hours = SecAdd / 3600;
rez.Minutes = (SecAdd - rez.Hours * 3600) / 60;
rez.Seconds = SecAdd - rez.Hours * 3600 - rez.Minutes * 60;
return rez;
}