LcJuves / lcjuves

Show me something

Home Page:https://github.lcjuves.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hi there πŸ‘‹

My feature programming languages

Rust ZIG Java Dart

/**
 * Created at 2020/8/22 20:40
 *
 * @author Liangcheng Juves
 */
fn main() {
    print!("hello,world\n");
}
/**
 * Created at 2020/9/15 15:14
 *
 * @author Liangcheng Juves
 */
use std::io::{stdout, Result, Write};
use std::thread::sleep;
use std::time::Duration;

fn main() -> Result<()> {
    const BAR_LAB: &str = "-\\|/";
    for perc in 0..=100 {
        print!(
            "\r {} \u{1b}[42m{}\u{1b}[0m [ {}% ] ",
            BAR_LAB.chars().nth(perc % 4).unwrap(),
            " ".repeat(perc / 2),
            perc
        );
        stdout().flush()?;
        sleep(Duration::from_micros(60_000));
    }
    println!();
    Ok(())
}
/**
 * Created at 2020/11/16 22:49
 *
 * @author Liangcheng Juves
 */
use std::io::{stdout, Result, Write};
use std::thread::sleep;
use std::time::{Duration, SystemTime, UNIX_EPOCH};

fn main() -> Result<()> {
    loop {
        print!(
            "\r{}",
            SystemTime::now()
                .duration_since(UNIX_EPOCH)
                .unwrap()
                .as_secs()
        );
        sleep(Duration::from_micros(300));
        stdout().flush()?
    }
}

About

Show me something

https://github.lcjuves.com


Languages

Language:Shell 55.6%Language:Rust 35.2%Language:Dart 8.5%Language:HTML 0.7%