code: public static int packTime(final long milliseconds) {
          final int millis = (int) (milliseconds % 1000);
          final int seconds = (int) ((milliseconds / 1000) % 60);
          final int minutes = (int) ((milliseconds / (1000 * 60)) % 60);
          final int hours = (int) ((milliseconds / (1000 * 60 * 60)) % 24);
          /* OK, now we pack the pieces into a 4-byte integer */
          return (millis * (1 << START_BIT_MILLISECONDS))
                  + (seconds * (1 << START_BIT_SECONDS))
                  + (minutes * (1 << START_BIT_MINUTES))
                  + hours;
      }
docs: packs the time portion of a millisecond time stamp into an int
  <p/>
  format:
  <pre>
  The part of the day, stored in a 4 byte integer as follows:
  <p/>
  | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 |
  | mS | mS | mS | mS | mS | mS | mS | mS |
  | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
  | mS | mS | mS | mS | mS | mS | mS | SS |
  | 15 | 14 | 13 | 12 | 11 | 10 | 09 | 08 |
  | SS | SS | SS | SS | SS | MM | MM | MM |
  | 07 | 06 | 05 | 04 | 03 | 02 | 01 | 00 |
  | MM | MM | MM | HH | HH | HH | HH | HH |
  </pre>
  
  @param milliseconds the milliseconds to pack
  @return a packed integer containing the time