【发布时间】:2012-03-02 10:40:51
【问题描述】:
我想根据用户通过单选按钮选择的分钟(1 分钟、15、30、45 分钟等)将信息附加到文件中。对于每个单选按钮,switch 语句中都有大小写。我发现很难定期更新文件,有没有人知道如何根据选择的任何分钟来更新文件。 time_int 是当前时间,update_point 是文件需要更新的下一个间隔点?所以请帮助使用 UPDATEFILE() 方法。
public void radioStartTime(int t) {
time_int = System.currentTimeMillis(); //time radio button is clicked, clock the time on click
System.out.println(sdf.format(time_int));
/* a case/situation for different radio button selected*/
switch (t) {
case 1:
update_point = time_int + (1*60000);
System.out.println(sdf.format(update_point));
UPDATEFILE????(1);
break;
.....
【问题讨论】: