43
43
import android .opengl .GLSurfaceView ;
44
44
import android .os .Bundle ;
45
45
import android .os .Handler ;
46
- import android .text .format .Time ;
46
+ // import android.text.format.Time;
47
47
import android .util .*;
48
48
import android .view .LayoutInflater ;
49
49
import android .view .MotionEvent ;
@@ -3080,7 +3080,7 @@ public void focusLost() { }
3080
3080
// getting the time
3081
3081
3082
3082
3083
- static protected Time time = new Time ();
3083
+ // static protected Time time = new Time();
3084
3084
3085
3085
/**
3086
3086
* Get the number of milliseconds since the applet started.
@@ -3094,16 +3094,16 @@ public int millis() {
3094
3094
3095
3095
/** Seconds position of the current time. */
3096
3096
static public int second () {
3097
- // return Calendar.getInstance().get(Calendar.SECOND);
3098
- time .setToNow ();
3099
- return time .second ;
3097
+ return Calendar .getInstance ().get (Calendar .SECOND );
3098
+ // time.setToNow();
3099
+ // return time.second;
3100
3100
}
3101
3101
3102
3102
/** Minutes position of the current time. */
3103
3103
static public int minute () {
3104
- // return Calendar.getInstance().get(Calendar.MINUTE);
3105
- time .setToNow ();
3106
- return time .minute ;
3104
+ return Calendar .getInstance ().get (Calendar .MINUTE );
3105
+ // time.setToNow();
3106
+ // return time.minute;
3107
3107
}
3108
3108
3109
3109
/**
@@ -3114,9 +3114,9 @@ static public int minute() {
3114
3114
* if (yankeeHour == 0) yankeeHour = 12;</PRE>
3115
3115
*/
3116
3116
static public int hour () {
3117
- // return Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
3118
- time .setToNow ();
3119
- return time .hour ;
3117
+ return Calendar .getInstance ().get (Calendar .HOUR_OF_DAY );
3118
+ // time.setToNow();
3119
+ // return time.hour;
3120
3120
}
3121
3121
3122
3122
/**
@@ -3126,28 +3126,28 @@ static public int hour() {
3126
3126
* or day of the year (1..365) then use java's Calendar.get()
3127
3127
*/
3128
3128
static public int day () {
3129
- // return Calendar.getInstance().get(Calendar.DAY_OF_MONTH);
3130
- time .setToNow ();
3131
- return time .monthDay ;
3129
+ return Calendar .getInstance ().get (Calendar .DAY_OF_MONTH );
3130
+ // time.setToNow();
3131
+ // return time.monthDay;
3132
3132
}
3133
3133
3134
3134
/**
3135
3135
* Get the current month in range 1 through 12.
3136
3136
*/
3137
3137
static public int month () {
3138
3138
// months are number 0..11 so change to colloquial 1..12
3139
- // return Calendar.getInstance().get(Calendar.MONTH) + 1;
3140
- time .setToNow ();
3141
- return time .month + 1 ;
3139
+ return Calendar .getInstance ().get (Calendar .MONTH ) + 1 ;
3140
+ // time.setToNow();
3141
+ // return time.month + 1;
3142
3142
}
3143
3143
3144
3144
/**
3145
3145
* Get the current year.
3146
3146
*/
3147
3147
static public int year () {
3148
- // return Calendar.getInstance().get(Calendar.YEAR);
3149
- time .setToNow ();
3150
- return time .year ;
3148
+ return Calendar .getInstance ().get (Calendar .YEAR );
3149
+ // time.setToNow();
3150
+ // return time.year;
3151
3151
}
3152
3152
3153
3153
0 commit comments