Class Deadline
This class represents the latest date or time by which an operation should be completed.
Inherited Members
Namespace: Akka.Remote
Assembly: Akka.Remote.dll
Syntax
public class Deadline
Constructors
| Edit this page View SourceDeadline(DateTime)
Initializes a new instance of the Deadline class.
Declaration
public Deadline(DateTime when)
Parameters
Type | Name | Description |
---|---|---|
DateTime | when | The DateTime that the deadline is due. |
Properties
| Edit this page View SourceHasTimeLeft
Determines whether there is still time left until the deadline.
Declaration
public bool HasTimeLeft { get; }
Property Value
Type | Description |
---|---|
bool |
IsOverdue
Determines whether the deadline has past.
Declaration
public bool IsOverdue { get; }
Property Value
Type | Description |
---|---|
bool |
Now
A deadline that is due UtcNow
Declaration
public static Deadline Now { get; }
Property Value
Type | Description |
---|---|
Deadline |
TimeLeft
The amount of time left until the deadline is reached.
note
Warning: creates a new TimeSpan instance each time it's used
Declaration
public TimeSpan TimeLeft { get; }
Property Value
Type | Description |
---|---|
TimeSpan |
When
The DateTime that the deadline is due.
Declaration
public DateTime When { get; }
Property Value
Type | Description |
---|---|
DateTime |
Methods
| Edit this page View SourceEquals(object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceGetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int |
Overrides
Operators
| Edit this page View Sourceoperator +(Deadline, TimeSpan?)
Adds a given Nullable<T> to the due time of this Deadline
Declaration
public static Deadline operator +(Deadline deadline, TimeSpan? duration)
Parameters
Type | Name | Description |
---|---|---|
Deadline | deadline | The deadline whose time is being extended |
TimeSpan? | duration | The amount of time being added to the deadline |
Returns
Type | Description |
---|---|
Deadline | A new deadline with the specified duration added to the due time |
operator +(Deadline, TimeSpan)
Declaration
public static Deadline operator +(Deadline deadline, TimeSpan duration)
Parameters
Type | Name | Description |
---|---|---|
Deadline | deadline | The deadline whose time is being extended |
TimeSpan | duration | The amount of time being added to the deadline |
Returns
Type | Description |
---|---|
Deadline | A new deadline with the specified duration added to the due time |