Skip to content

Commit

Permalink
Fix timestamp in lang.transaction
Browse files Browse the repository at this point in the history
Part of #267.
  • Loading branch information
jclark committed Dec 14, 2020
1 parent f51ba06 commit eb02b92
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lang/lib/transaction.bal
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,19 @@ type Info readonly & record {|
// a previous one
int retryNumber;
// probably useful for timeouts and logs
timestamp startTime;
Timestamp startTime;
// maybe useful
Info? prevAttempt;
|};

# An instant in time.
public type Timestamp readonly & object {
# Returns milliseconds since 1970-01-01T00:00:00Z, not including leap seconds
public toMillisecondsInt() returns int;
# Returns a string representation of the timestamp in ISO 8601 format
public toString() returns string;
};

# Returns information about the current transaction
public transactional isolated function info() returns Info = external;

Expand Down

0 comments on commit eb02b92

Please sign in to comment.