Duration returns v as time.Duration.
()
| 769 | |
| 770 | // Duration returns v as time.Duration. |
| 771 | func (v RxDelay) Duration() time.Duration { |
| 772 | switch v { |
| 773 | case RxDelay_RX_DELAY_0, RxDelay_RX_DELAY_1: |
| 774 | return time.Second |
| 775 | default: |
| 776 | return time.Duration(v) * time.Second |
| 777 | } |
| 778 | } |
| 779 | |
| 780 | // Validate reports whether v represents a valid RxDelay. |
| 781 | func (v RxDelay) Validate() error { |
no outgoing calls