Skip to content

Commit

Permalink
Implement nbrDelay and nbrLag
Browse files Browse the repository at this point in the history
  • Loading branch information
DanySK committed Nov 14, 2016
1 parent fdd455c commit 7000eaf
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,14 @@ public ExecutionEnvironment getExecutionEnvironment() {

@Override
public Field nbrLag() {
return buildField(Functions.identity(), 0);
return buildField(time -> getCurrentTime().doubleValue() - time, getCurrentTime().doubleValue());
}

/**
* @return The same behavior of MIT Proto's nbrdelay (forward view).
*/
public Field nbrDelay() {
return buildField(Functions.identity(), getDeltaTime());
}

@Override
Expand Down

0 comments on commit 7000eaf

Please sign in to comment.