Skip to content

Instantly share code, notes, and snippets.

@thuypt
Last active February 8, 2017 04:09
Show Gist options
  • Save thuypt/b8087c36ccc424a04561b2184b69016e to your computer and use it in GitHub Desktop.
Save thuypt/b8087c36ccc424a04561b2184b69016e to your computer and use it in GitHub Desktop.
public class TaxiCrewTime {
private String mTime;
// set, get, validate
@Override
public long getMilliseconds() {
return calculateMilisecondTie(mTime);
}
}
public class Dispatch implements Parcelable {
....
@SerializedName("arrival_time")
private TaxiCrewTime mArrivalTime;
@SerializedName("accept_time")
private TaxiCrewTime mAcceptTime;
}
}
public class TimerPreference {
public static void saveAcceptedTime(TaxiCrewTime time, Preference_ pref) {
pref.orderAcceptedTime().put(time.getMilliseconds());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment