Change auction deadline from milliseconds in Int to a Java Timestamp #39

Closed
opened 2021-11-04 15:52:47 +00:00 by reynisson · 0 comments
reynisson commented 2021-11-04 15:52:47 +00:00 (Migrated from github.com)
  • Change the value object AuctionDeadline in the Auction class from an int to a Java Timestamp
  • Change the logic that schedules the end of the auction in ch.unisg.tapas.auctionhouse.application.service.StartAuctionService so that it can handle Timestamps. (See: https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledExecutorService.html for an example). They say " For example, to schedule at a certain future date, you can use: schedule(task, date.getTime() - System.currentTimeMillis(), TimeUnit.MILLISECONDS). Beware however that expiration of a relative delay need not coincide with the current Date at which the task is enabled due to network time synchronization protocols, clock drift, or other factors."
- [ ] Change the value object AuctionDeadline in the Auction class from an int to a Java Timestamp - [ ] Change the logic that schedules the end of the auction in ch.unisg.tapas.auctionhouse.application.service.StartAuctionService so that it can handle Timestamps. (See: https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledExecutorService.html for an example). They say " For example, to schedule at a certain future date, you can use: schedule(task, date.getTime() - System.currentTimeMillis(), TimeUnit.MILLISECONDS). Beware however that expiration of a relative delay need not coincide with the current Date at which the task is enabled due to network time synchronization protocols, clock drift, or other factors."
Sign in to join this conversation.
No description provided.