Skip to content

Commit

Permalink
Make getDurationSeconds of long type
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel27m committed Jul 19, 2024
1 parent 2290dc4 commit 62a1cba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/main/java/io/iworkflow/core/command/TimerCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
@Value.Immutable
public abstract class TimerCommand implements BaseCommand {

public abstract int getDurationSeconds();
public abstract long getDurationSeconds();

public static TimerCommand createByDuration(String commandId, Duration duration) {
return ImmutableTimerCommand.builder()
.commandId(commandId)
.durationSeconds((int) duration.getSeconds())
.durationSeconds(duration.getSeconds())
.build();
}

public static TimerCommand createByDuration(Duration duration) {
return ImmutableTimerCommand.builder()
.durationSeconds((int) duration.getSeconds())
.durationSeconds(duration.getSeconds())
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
public class TimerCommandMapper {
public static TimerCommand toGenerated(io.iworkflow.core.command.TimerCommand timerCommand) {
final TimerCommand command = new TimerCommand()
.durationSeconds((long) timerCommand.getDurationSeconds());
.durationSeconds(timerCommand.getDurationSeconds());
if (timerCommand.getCommandId().isPresent()) {
command.commandId(timerCommand.getCommandId().get());
}
Expand Down

0 comments on commit 62a1cba

Please sign in to comment.