create-aelf-dapp
Version:
Create aelf Dapp based on Next.js with one command
15 lines (13 loc) • 400 B
text/typescript
import { aggregateExecutionTime } from 'opentelemetry-launcher';
export class ExampleService {
syncMethod() {
for (let i = 0; i < 1e6; i++) {} // Simulate workload
return 'Sync result';
}
async asyncMethod() {
await new Promise((resolve) => setTimeout(resolve, 1000)); // Simulate async workload
return 'Async result';
}
}