First you call the Calendar
[HIGH]Calendar c = Calendar.getInstance();[/HIGH]
Then you need to create a SimpleDateFormat to get the time format you want
[HIGH]SimpleDateFormat sdf = new SimpleDateFormat("kkmm");[/HIGH]
The format kkmm returns the time in a 24 hour "style". So if the system time was 9:27, kkmm would return 2127. You could put a " in between the kk and mm, but that would break the ability for the date to be converted to an int, which is how we will check if it's before 10.
So, to check if it's before 10 (assuming PM), you would have this:
[HIGH]Calendar c = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat("kkmm");
int i = Integer.parseInt(sdf.format(c.getTime()));
if (i < 2200) {
// do stuff
}[/HIGH]
Hope this helps!