Skip to content

Commit

Permalink
Print time
Browse files Browse the repository at this point in the history
  • Loading branch information
claucece committed Sep 17, 2024
1 parent 003e498 commit 5ede80b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions demo/examples/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use rand::rngs::OsRng;
use reqwest::Client;
use serde::{Deserialize, Serialize};
use std::error::Error;
use std::time::Instant;

use ark_ec::CurveConfig;
use ark_serialize::{CanonicalDeserialize, CanonicalSerialize};
Expand Down Expand Up @@ -50,6 +51,8 @@ struct Message {

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
let start_time = Instant::now();

// Create a Reqwest client
let client = Client::builder()
.danger_accept_invalid_certs(true) // Accept self-signed certificates
Expand Down Expand Up @@ -355,5 +358,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
println!("HTTPS Error: {}", https_response.status());
}

let elapsed_time = start_time.elapsed(); // Calculate elapsed time
println!("Total execution time: {:?}", elapsed_time); // Print elapsed time
Ok(())
}

1 comment on commit 5ede80b

@evoyy
Copy link

@evoyy evoyy commented on 5ede80b Sep 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant comments

Please sign in to comment.