Blyx Nest Blyx language
Registry / Library
library · v0.1.0

DeadlinePath

Propagate a parent time budget across elapsed RPC stages.

Source repository · Package JSON

Use DeadlinePath

use vendor::deadlinepath::deadlinepath;

Run the example

nest demo deadlinepath@0.1.0
blyxc native-run deadlinepath-demo/main.blyx
Example source and expected output
use vendor::deadlinepath::deadlinepath;

fn main() {
    let budget = 100.0;
    let stages = [20, 35];
    let reserve = 10.0;
    let result = deadlinepath_remaining(budget, stages, reserve);
    if len(result) == 0 { println!("invalid"); return; }
    let mut i = 0;
    while i < len(result) {
        println!(at(result, i));
        i += 1;
    }
}

Expected output

35
0
55

Published versions

VersionPackageSource commitSHA-256
0.1.0Download ZIP550861e76e56838afef97a5a3022980ef3d10906120ee6c588b947c18e977203d34f4cb21f