Skip to content

Compile error trying to use process.time() #2691

Closed
@brian-hay

Description

@brian-hay

Question

New to AS so it's likely me doing something wrong.

When I try to export a function using process.time() I receive a compile error:

import { process } from 'process';

export function start(): void {
  const time: i64 = process.time();
}
ERROR AS200: Conversion from type 'f64' to 'i64' requires an explicit cast.
    :
 32 │ return Date_binding.now();
    │        ~~~~~~~~~~~~~~~~~~
    └─ in ~lib/process.ts(32,12)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions