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

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."
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?