实习入职第十二天：MediaPlayer时间之间的转换函数

/**
* 计算连个时间之间的秒数
*/

private static int totalSeconds(String startTime, String endTime) {

String[] st = startTime.split(":");
String[] et = endTime.split(":");

int st_h = Integer.valueOf(st[0]);
int st_m = Integer.valueOf(st[1]);
int st_s = Integer.valueOf(st[2]);

int et_h = Integer.valueOf(et[0]);
int et_m = Integer.valueOf(et[1]);
int et_s = Integer.valueOf(et[2]);

int totalSeconds = (et_h - st_h) * 3600 + (et_m - st_m) * 60
+ (et_s - st_s);

return totalSeconds;

}

/**
* 根据当前选择的秒数还原时间点

* @param args
*/

private static String getCheckTimeBySeconds(int progress, String startTime) {

String return_h = "", return_m = "", return_s = "";

String[] st = startTime.split(":");

int st_h = Integer.valueOf(st[0]);
int st_m = Integer.valueOf(st[1]);
int st_s = Integer.valueOf(st[2]);

int h = progress / 3600;

int m = (progress % 3600) / 60;

int s = progress % 60;

if ((s + st_s) >= 60) {

int tmpSecond = (s + st_s) % 60;

m = m + 1;

if (tmpSecond >= 10) {
return_s = tmpSecond + "";
} else {
return_s = "0" + (tmpSecond);
}

} else {
if ((s + st_s) >= 10) {
return_s = s + st_s + "";
} else {
return_s = "0" + (s + st_s);
}

}

if ((m + st_m) >= 60) {

int tmpMin = (m + st_m) % 60;

h = h + 1;

if (tmpMin >= 10) {
return_m = tmpMin + "";
} else {
return_m = "0" + (tmpMin);
}

} else {
if ((m + st_m) >= 10) {
return_m = (m + st_m) + "";
} else {
return_m = "0" + (m + st_m);
}

}

if ((st_h + h) < 10) {
return_h = "0" + (st_h + h);
} else {
return_h = st_h + h + "";
}

return return_h + ":" + return_m + ":" + return_s;
}

}

public static String getStandardTime(int time) {
time = time/1000;
int h = time / 1000 / 60 / 24;
int m = (time - h * 1000 * 60 * 24) / 1000 / 60;
int s = (time - h * 1000 * 60 * 24 - m * 1000 * 60);
if(time<0){
return "00:00";
}else if(isNum(h)){
return hasTwo(m)+":"+hasTwo(s);
}else{
return hasTwo(h)+":"+hasTwo(m)+":"+hasTwo(s);
}
}

public static boolean isNum(int n){
if (n==0)
return true;
else
return false;
}

public static String hasTwo(int n) {
if ((n >= 10 && n <= 99))
return n+"";
else
return "0"+n;
}

腾讯实习生入职报到注意点（2012）

2012-05-31 11:56:51

入职公司实习两周的一些感受

2012-07-13 20:00:42

TP-LINK实习生总结

2011-04-24 21:38:00

实习生入职第一天感想与收获

2015-07-15 19:18:53

实习生刚入职 两周总结

2016-03-11 10:20:59

2015年阿里实习经历

2015-10-30 14:15:13

DAY01 实习入职第一天

2017-12-29 15:37:45

公司实习不到两周的总结and感想

2014-10-19 23:25:13

实习入职第三天：小知识点必须熟记

2016-05-22 19:11:03

在华为实习的日子

2016-07-23 00:20:33