dart-sdk/sdk
Nate Bosch d7af8ef846 Remove indirection in Timer example
The example was originally written without a `main`, and with an example
using `Duration.operator *`. An update added a call to the example
method from a new `main`, removed the usage of `Duration.operator *`,
but did not remove the prose reference.

- Remove the sentence mentioning that the duration can be const or
  computed.
- Remove the intermediate `scheduleTimeout` method, move the `Timer`
  construction to `main`. This removes any consideration of `Duration`
  vs `int milliseconds` which had been added in an attempt make the docs
  more focused on `Timer` than `Duration`.

R=lrn@google.com

CoreLibraryReviewExempt:Documentation change.
Change-Id: I26bb4e12910eb50cf5975b8a6573701a5a862070
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330980
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2023-10-19 18:26:49 +00:00
..
bin Update Binaryen to a51bd6df919a5b79574f0996a760cc20cb05697e 2023-09-21 11:47:59 +00:00
lib Remove indirection in Timer example 2023-10-19 18:26:49 +00:00
.gitignore [sdk] Generate a version file for the unpatched SDK 2022-05-05 10:36:05 +00:00
api_readme.md [docs] fix a grammar issue in the sdk readme 2023-04-26 18:25:55 +00:00
BUILD.gn [Reland] [dartdev] Convert gen_kernel.dart.snapshot into an AOT snapshot 2023-09-26 21:46:58 +00:00
OWNERS [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00