mirror of
https://github.com/NotXia/dotfiles.git
synced 2025-12-16 02:41:47 +01:00
Codium config
This commit is contained in:
45
.config/VSCodium/User/snippets/cpp.json
Normal file
45
.config/VSCodium/User/snippets/cpp.json
Normal file
@ -0,0 +1,45 @@
|
||||
{
|
||||
"C++ Template": {
|
||||
"prefix": "C++ template",
|
||||
"body": [
|
||||
"$BLOCK_COMMENT_START",
|
||||
" Descrizione: $1",
|
||||
" Autore: Tian Cheng Xia",
|
||||
" Data: $CURRENT_DATE/$CURRENT_MONTH/$CURRENT_YEAR $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
|
||||
"$BLOCK_COMMENT_END",
|
||||
"#include <iostream>",
|
||||
"using namespace std;",
|
||||
"",
|
||||
"int main() {",
|
||||
" $0",
|
||||
" return 0;",
|
||||
"}"
|
||||
],
|
||||
"description": "C++ template"
|
||||
},
|
||||
|
||||
"Execution time": {
|
||||
"prefix": "exectime",
|
||||
"body": [
|
||||
"#include <iostream>",
|
||||
"#include <ctime>",
|
||||
"using namespace std;",
|
||||
"",
|
||||
"int main() {",
|
||||
" clock_t t_start, t_end;",
|
||||
" t_start = clock();",
|
||||
"",
|
||||
" // Code --",
|
||||
" $0",
|
||||
" // -------",
|
||||
"",
|
||||
" t_end = clock();",
|
||||
" double time = double(t_end - t_start) / double(CLOCKS_PER_SEC);",
|
||||
" cout.precision(17);",
|
||||
" cout <<\"Tempo di esecuzione: \" << fixed <<time <<\" s\";",
|
||||
" return 0;",
|
||||
"}"
|
||||
],
|
||||
"description": "C++ template"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user